about summary refs log tree commit homepage
path: root/lib/PublicInbox/OverIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-03 10:48:26 +0000
committerEric Wong <e@80x24.org>2021-04-03 18:38:47 +0000
commitb3e2975029ae938bb232aaa0cbc3dabda55d57d6 (patch)
treebe5e7278753fa9314fded8c64c13d0d1c67e2990 /lib/PublicInbox/OverIdx.pm
parente8ad075ab7d02b260fdf8470e6d851ade4eac6fa (diff)
downloadpublic-inbox-b3e2975029ae938bb232aaa0cbc3dabda55d57d6.tar.gz
We need a stable fallback time for digest2mid in the presence
of messages without Received/Date headers.  Furthermore, we
must avoid using uninitialized smsg->{mid} when parsing
References for draft replies.
Diffstat (limited to 'lib/PublicInbox/OverIdx.pm')
-rw-r--r--lib/PublicInbox/OverIdx.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm
index e1cd31b9..66dec099 100644
--- a/lib/PublicInbox/OverIdx.pm
+++ b/lib/PublicInbox/OverIdx.pm
@@ -264,8 +264,10 @@ sub add_overview {
         $smsg->{lines} = $eml->body_raw =~ tr!\n!\n!;
         my $mids = mids_for_index($eml);
         my $refs = $smsg->parse_references($eml, $mids);
-        $mids->[0] //= $smsg->{mid} //= $eml->{-lei_fake_mid};
-        $smsg->{mid} //= '';
+        $mids->[0] //= do {
+                $smsg->{mid} //= '';
+                $eml->{-lei_fake_mid};
+        };
         my $subj = $smsg->{subject};
         my $xpath;
         if ($subj ne '') {