lib/PublicInbox/View.pm | 5 ++++- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 07023e814516c40862ed32b0c2c86ebe7ba5f4db..ccdcde2a42df8515b3d2a2f69a643ea8c012b93b 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -823,7 +823,10 @@ my $mid = mid_clean($x->header('Message-ID')); my $u = $x->header('X-PI-From'); my $ts = $x->header('X-PI-TS'); - $state->{latest}->{$topic} = [ $mid, $u, $ts ]; + my $exist = $state->{latest}->{$topic}; + if (!$exist || $exist->[2] < $ts) { + $state->{latest}->{$topic} = [ $mid, $u, $ts ]; + } } else { # ghost message, do not bump level $child_adjust = 0;