diff options
author | Eric Wong <e@80x24.org> | 2024-01-01 01:07:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2024-01-02 18:39:39 +0000 |
commit | 8e253786fb256da75e67d8adc27a759dba23289a (patch) | |
tree | f4125f3392d5753ef58ff2589675b0b6cc5f296e | |
parent | 5aab49f319679cf7912f1abf4914272e5112e247 (diff) | |
download | public-inbox-8e253786fb256da75e67d8adc27a759dba23289a.tar.gz |
When retrieving loose (Subject) matches for a thread, we wanted the most recent matches in reverse chronological order. However, when displaying the /T/ endpoint generating the thread skeleton, we prefer ascending chronological order to match the flow of the conversation. Reported-by: Askar Safin <safinaskar@gmail.com> Link: https://public-inbox.org/meta/CAPnZJGAqsh8ZhPaCAy5M2NZVNcWrr_Hr94t32VXiyiTXwD9jRQ@mail.gmail.com/
-rw-r--r-- | lib/PublicInbox/Over.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/Over.pm b/lib/PublicInbox/Over.pm index 4eed4f46..3b7d49f5 100644 --- a/lib/PublicInbox/Over.pm +++ b/lib/PublicInbox/Over.pm @@ -200,6 +200,11 @@ ORDER BY $sort_col DESC # TODO separate strict and loose matches here once --reindex # is fixed to preserve `tid' properly push @$msgs, @$loose; + + # we wanted to retrieve the latest loose messages; but preserve + # chronological ordering for threading /$INBOX/$MSGID/[tT]/ + $sort_col eq 'ds' and + @$msgs = sort { $a->{ds} <=> $b->{ds} } @$msgs; } ($nr, $msgs); } |