about summary refs log tree commit homepage
path: root/lib/PublicInbox/OverIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-31 13:51:38 +0000
committerEric Wong <e@80x24.org>2021-01-01 05:00:39 +0000
commitcb2b5984109b2caad941e3a2c952219890079acc (patch)
tree30b6f39a13e62bb06320dd39f5a9780a7d6924a8 /lib/PublicInbox/OverIdx.pm
parent657695bf0b30ae8ddaef57739c4d24e5e38afdbf (diff)
downloadpublic-inbox-cb2b5984109b2caad941e3a2c952219890079acc.tar.gz
For personal mail, unsent drafts messages are a common source of
messages without Message-IDs.
Diffstat (limited to 'lib/PublicInbox/OverIdx.pm')
-rw-r--r--lib/PublicInbox/OverIdx.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm
index bc2e3ef4..dad3966d 100644
--- a/lib/PublicInbox/OverIdx.pm
+++ b/lib/PublicInbox/OverIdx.pm
@@ -284,6 +284,8 @@ sub add_overview {
         $smsg->{lines} = $eml->body_raw =~ tr!\n!\n!;
         my $mids = mids_for_index($eml);
         my $refs = parse_references($smsg, $eml, $mids);
+        $mids->[0] //= $smsg->{mid} //= $eml->{-lei_fake_mid};
+        $smsg->{mid} //= '';
         my $subj = $smsg->{subject};
         my $xpath;
         if ($subj ne '') {