about summary refs log tree commit homepage
path: root/lib/PublicInbox/Inbox.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/Inbox.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/Inbox.pm')
-rw-r--r--lib/PublicInbox/Inbox.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 666c81d7..b1ea8dc7 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -8,6 +8,7 @@ use warnings;
 use PublicInbox::Git;
 use PublicInbox::MID qw(mid2path);
 use Devel::Peek qw(SvREFCNT);
+use PublicInbox::MIME;
 
 my $cleanup_timer;
 eval {
@@ -246,6 +247,14 @@ sub msg_by_smsg ($$;$) {
         $str;
 }
 
+sub smsg_mime {
+        my ($self, $smsg, $ref) = @_;
+        if (my $s = msg_by_smsg($self, $smsg, $ref)) {
+                $smsg->{mime} = PublicInbox::MIME->new($s);
+                return $smsg;
+        }
+}
+
 sub path_check {
         my ($self, $path) = @_;
         git($self)->check('HEAD:'.$path);