about summary refs log tree commit homepage
path: root/lib/PublicInbox/Smsg.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-07-24 05:55:51 +0000
committerEric Wong <e@yhbt.net>2020-07-25 20:48:18 +0000
commit08e8e9522405e40985935b13e9eaaf409e33da75 (patch)
tree4ec5141f2b031114fb3c5598ff3b1dfbd9b974ab /lib/PublicInbox/Smsg.pm
parentfafd40fbe5ed0b022a2712cc1509e9600eb7333d (diff)
downloadpublic-inbox-08e8e9522405e40985935b13e9eaaf409e33da75.tar.gz
The V2Writable object may be long-lived, so it makes more
sense to put the {autime} and {cotime} fields into the
shorter-lived index_sync state.
Diffstat (limited to 'lib/PublicInbox/Smsg.pm')
-rw-r--r--lib/PublicInbox/Smsg.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/Smsg.pm b/lib/PublicInbox/Smsg.pm
index 725d4206..aaf88f35 100644
--- a/lib/PublicInbox/Smsg.pm
+++ b/lib/PublicInbox/Smsg.pm
@@ -96,7 +96,7 @@ sub from_mitem {
 
 # for Import and v1 non-SQLite WWW code paths
 sub populate {
-        my ($self, $hdr, $v2w) = @_;
+        my ($self, $hdr, $sync) = @_;
         for my $f (qw(From To Cc Subject)) {
                 my @all = $hdr->header($f);
                 my $val = join(', ', @all);
@@ -117,9 +117,9 @@ sub populate {
                 }
                 $self->{$f} = $val if $val ne '';
         }
-        $v2w //= {};
-        $self->{-ds} = [ my @ds = msg_datestamp($hdr, $v2w->{autime}) ];
-        $self->{-ts} = [ my @ts = msg_timestamp($hdr, $v2w->{cotime}) ];
+        $sync //= {};
+        $self->{-ds} = [ my @ds = msg_datestamp($hdr, $sync->{autime}) ];
+        $self->{-ts} = [ my @ts = msg_timestamp($hdr, $sync->{cotime}) ];
         $self->{ds} //= $ds[0]; # no zone
         $self->{ts} //= $ts[0];