-# 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.
$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)) {
$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
$subj;
}
-sub xref3 {
- my ($self, $doc) = @_;
- my $end = $doc->termlist_end;
- my $it = $doc->termlist_begin;
- $it->skip_to('P');
- my @ret;
- for (; $it != $end; $it++) {
- my $val = $it->get_termname;
- $val =~ s/\AP// and push @ret, $val;
- }
- \@ret;
-}
-
1;