X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FSmsg.pm;h=571cbb6faca9417d804b1771b0bb94fdac5e6987;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=140865389bce65102b9a00ee2c739780d4caefb5;hpb=2255a4ad2fa2384c1f4cec6dd267383396cbc945;p=public-inbox.git diff --git a/lib/PublicInbox/Smsg.pm b/lib/PublicInbox/Smsg.pm index 14086538..571cbb6f 100644 --- a/lib/PublicInbox/Smsg.pm +++ b/lib/PublicInbox/Smsg.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2020 all contributors +# Copyright (C) 2015-2021 all contributors # License: AGPL-3.0+ # # A small/skeleton/slim representation of a message. @@ -69,7 +69,7 @@ sub psgi_cull ($) { $self; } -# for Import and v1 non-SQLite WWW code paths +# used for v2, Import and v1 non-SQLite WWW code paths sub populate { my ($self, $hdr, $sync) = @_; for my $f (qw(From To Cc Subject)) { @@ -100,9 +100,7 @@ sub populate { $self->{-ts} = [ my @ts = msg_timestamp($hdr, $sync->{cotime}) ]; $self->{ds} //= $ds[0]; # no zone $self->{ts} //= $ts[0]; - - # for v1 users w/o SQLite - $self->{mid} //= eval { mids($hdr)->[0] } // ''; + $self->{mid} //= mids($hdr)->[0]; } # no strftime, that is locale-dependent and not for RFC822