about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchMsg.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-26 19:33:18 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-27 10:18:45 +0000
commit956abe9ad5f13a0d1755262be412d6a54fda72e9 (patch)
treecda2a73b8e234dbf6e3b1842e541054ab8a4d777 /lib/PublicInbox/SearchMsg.pm
parent50f7b8e95db516104cef237bb0a555a566ff150e (diff)
downloadpublic-inbox-956abe9ad5f13a0d1755262be412d6a54fda72e9.tar.gz
Since we need to handle messages with multiple and duplicate
Message-ID headers, our thread skeleton display must account
for that.

Since we have a "preferred" Message-ID in case of conflicts,
use it as the UUID in an Atom feed so readers do not get
confused by conflicts.
Diffstat (limited to 'lib/PublicInbox/SearchMsg.pm')
-rw-r--r--lib/PublicInbox/SearchMsg.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm
index b944868f..e314fed1 100644
--- a/lib/PublicInbox/SearchMsg.pm
+++ b/lib/PublicInbox/SearchMsg.pm
@@ -6,7 +6,6 @@
 package PublicInbox::SearchMsg;
 use strict;
 use warnings;
-use Search::Xapian;
 use PublicInbox::MID qw/mid_clean mid_mime/;
 use PublicInbox::Address;
 use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
@@ -165,9 +164,10 @@ sub mid ($;$) {
                 $self->{mid} = $mid;
         } elsif (my $rv = $self->{mid}) {
                 $rv;
+        } elsif ($self->{doc}) {
+                $self->{mid} = _get_term_val($self, 'Q', qr/\AQ/);
         } else {
-                $self->{mid} = _get_term_val($self, 'Q', qr/\AQ/) ||
-                                $self->_extract_mid;
+                $self->_extract_mid; # v1 w/o Xapian
         }
 }