]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Smsg.pm
www_stream: extra link to mirroring information in the footer
[public-inbox.git] / lib / PublicInbox / Smsg.pm
index 2b72e8b5ae804e283cbd4711f2a001261da9355c..da8ce590991a3e40522bcab2bc0c561d5aa5683f 100644 (file)
@@ -76,14 +76,14 @@ sub parse_references ($$$) {
        return $refs if scalar(@$refs) == 0;
 
        # prevent circular references here:
-       my %seen = ( $smsg->{mid} => 1 );
+       my %seen = ( ($smsg->{mid} // '') => 1 );
        my @keep;
        foreach my $ref (@$refs) {
                if (length($ref) > PublicInbox::MID::MAX_MID_SIZE) {
                        warn "References: <$ref> too long, ignoring\n";
                        next;
                }
-               push(@keep, $ref) unless $seen{$ref}++;
+               $seen{$ref} //= push(@keep, $ref);
        }
        $smsg->{references} = '<'.join('> <', @keep).'>' if @keep;
        \@keep;