We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 344f1e0 commit e724599Copy full SHA for e724599
lib/MetaCPAN/Query/Release.pm
@@ -172,6 +172,26 @@ sub get_contributors {
172
@{ $contrib->{email} };
173
$contrib->{pauseid} = uc $pauseid
174
if $pauseid;
175
+
176
+ }
177
178
+ # check if contributor's email points to a registered author
179
+ if ( !$contrib->{pauseid} ) {
180
+ for my $email ( @{ $contrib->{email} } ) {
181
+ my $check_author = $self->es->search(
182
+ index => $self->index_name,
183
+ type => 'author',
184
+ body => {
185
+ query => { term => { email => $email } },
186
+ size => 10,
187
188
+ );
189
190
+ if ( $check_author->{hits}{total} ) {
191
+ $contrib->{pauseid}
192
+ = uc $check_author->{hits}{hits}[0]{_source}{pauseid};
193
194
195
}
196
197
0 commit comments