From 956abe9ad5f13a0d1755262be412d6a54fda72e9 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Mon, 26 Mar 2018 19:33:18 +0000 Subject: view: depend on SearchMsg for Message-ID 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. --- lib/PublicInbox/Inbox.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/PublicInbox/Inbox.pm') 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); -- cgit v1.2.3-24-ge0c7