]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
update copyrights for 2018
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index 0824db03c113a5d001b846b3f4c115ae1a3d7de2..66faed312c3243f1a56789c898b7d5bd4dd6e4a3 100644 (file)
@@ -1,5 +1,5 @@
-# Copyright (C) 2015 all contributors <meta@public-inbox.org>
-# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+# Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # based on notmuch, but with no concept of folders, files or flags
 #
 # Indexes mail with Xapian and our (SQLite-based) ::Msgmap for use
@@ -414,9 +414,8 @@ sub link_message {
 
        # last References should be IRT, but some mail clients do things
        # out of order, so trust IRT over References iff IRT exists
-       my @refs = ($hdr->header_raw('References'),
-                       $hdr->header_raw('In-Reply-To'));
-       @refs = ((join(' ', @refs)) =~ /<([^>]+)>/g);
+       my @refs = (($hdr->header_raw('References') || '') =~ /<([^>]+)>/g);
+       push(@refs, (($hdr->header_raw('In-Reply-To') || '') =~ /<([^>]+)>/g));
 
        my $tid;
        if (@refs) {