From 6b7b1b1624163f4fff4705e4cc341e3b7a5475fe Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Jan 2019 10:30:42 +0000 Subject: view: fix wrong date for non-Xapian/SQLite v1 users We need to parse the MIME object in order to get the datestamp for those sites. Fixes: 7d02b9e64455 ("view: stop storing all MIME objects on large threads") --- lib/PublicInbox/View.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/View.pm') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 416cb4a8..5ddb8425 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -218,11 +218,12 @@ sub index_entry { $rv .= $subj . "\n"; $rv .= _th_index_lite($mid_raw, \$irt, $id, $ctx); my @tocc; + my $ds = $smsg->ds; # for v1 non-Xapian/SQLite users my $mime = delete $smsg->{mime}; # critical to memory use my $hdr = $mime->header_obj; my $from = _hdr_names_html($hdr, 'From'); obfuscate_addrs($obfs_ibx, $from) if $obfs_ibx; - $rv .= "From: $from @ ".fmt_ts($smsg->ds)." UTC"; + $rv .= "From: $from @ ".fmt_ts($ds)." UTC"; my $upfx = $ctx->{-upfx}; my $mhref = $upfx . mid_escape($mid_raw) . '/'; $rv .= qq{ (permalink / }; -- cgit v1.2.3-24-ge0c7