diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-26 19:33:18 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-27 10:18:45 +0000 |
commit | 956abe9ad5f13a0d1755262be412d6a54fda72e9 (patch) | |
tree | cda2a73b8e234dbf6e3b1842e541054ab8a4d777 /lib/PublicInbox/Inbox.pm | |
parent | 50f7b8e95db516104cef237bb0a555a566ff150e (diff) | |
download | public-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.pm | 9 |
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); |