]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Smsg.pm
update copyrights for 2021
[public-inbox.git] / lib / PublicInbox / Smsg.pm
index 140865389bce65102b9a00ee2c739780d4caefb5..571cbb6faca9417d804b1771b0bb94fdac5e6987 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2015-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
 # 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