diff options
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r-- | lib/PublicInbox/Inbox.pm | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 38abdfe5..af034358 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -326,18 +326,12 @@ sub msg_by_smsg ($$) { git($self)->cat_file($blob); } -sub smsg_mime { - my ($self, $smsg) = @_; - if (my $s = msg_by_smsg($self, $smsg)) { - $smsg->{mime} = PublicInbox::Eml->new($s); - return $smsg; - } -} - sub smsg_eml { my ($self, $smsg) = @_; my $bref = msg_by_smsg($self, $smsg) or return; - PublicInbox::Eml->new($bref); + my $eml = PublicInbox::Eml->new($bref); + $smsg->populate($eml) unless exists($smsg->{num}); # v1 w/o SQLite + $eml; } sub mid2num($$) { |