lib/PublicInbox/ContentId.pm | 3 +-- lib/PublicInbox/OverIdx.pm | 3 +-- diff --git a/lib/PublicInbox/ContentId.pm b/lib/PublicInbox/ContentId.pm index 0c4a8678beb02fa4db436ca12c55eda6bc0edc79..65691593abfcc36cb3cafef29420d627b84d07d6 100644 --- a/lib/PublicInbox/ContentId.pm +++ b/lib/PublicInbox/ContentId.pm @@ -64,8 +64,7 @@ # do NOT consider the Message-ID as part of the content_id # if we got here, we've already got Message-ID reuse my %seen = map { $_ => 1 } @{mids($hdr)}; foreach my $mid (@{references($hdr)}) { - next if $seen{$mid}; - $dig->add("ref\0$mid\0"); + $dig->add("ref\0$mid\0") unless $seen{$mid}++; } # Only use Sender: if From is not present diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm index 189bd21d93bc6731192dd26a333cc79f04b89c3e..5f1007aa68767979cdc8dd0c9a2d8cd34dc886ae 100644 --- a/lib/PublicInbox/OverIdx.pm +++ b/lib/PublicInbox/OverIdx.pm @@ -230,8 +230,7 @@ if (length($ref) > PublicInbox::MID::MAX_MID_SIZE) { warn "References: <$ref> too long, ignoring\n"; next; } - next if $seen{$ref}++; - push @keep, $ref; + push(@keep, $ref) unless $seen{$ref}++; } $smsg->{references} = '<'.join('> <', @keep).'>' if @keep; \@keep;