summaryrefslogtreecommitdiff
path: root/lib/threadbuilder.go
AgeCommit message (Collapse)Author
2022-07-26fixup: Hack up message list to be sorted ascendingtopic/asc_sort_imapcos
An attempt at making ascending or descending message list configurable. Seems to work for me, but a proper take on this might need to involve having to rethink what configuration options to present and how direct they map towards the operations happening under the hood.
2022-03-23threading: fix msg-id order in references headerKoni Marti
Fix order in the references header when an in-reply-to msg-id is erroneously added at the beginning instead of at the end. Add description to the function that cleans up the reference headers for threading. Reported-by: Evan Gates <evan.gates@gmail.com> Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
2022-03-22threading: fix stack overflow from faulty headersKoni Marti
Fix stack overflow from faulty headers that cause a circularity in the threading algorithm. Remove duplicated message-ids in the references headers. Check that the message-id itself is not part of the references. Fixes: https://todo.sr.ht/~rjarry/aerc/32 Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Robin Jarry <robin@jarry.cc> Acked-by: Robin Jarry <robin@jarry.cc>
2022-03-18go vet: unreachable codeMoritz Poldrack
This commit fixes all occurrences of the abovementioned lint-error in the codebase. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
2022-03-09threading: honor user-defined sort criteriaKoni Marti
Apply the user-defined sort criteria to the message with the highest uid in a threaded discussion. Restore the default sort order when leaving threading mode. Commit 7811620eb809 ("threading: implement on-the-fly message threading") introduced message threading with the threaded messages being only sorted by their message uids irrespective of the defined sorting criteria. It did not restore the default sort order either. Reported-by: Sebastien Binet <s@sbinet.org> Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
2022-02-24threading: implement on-the-fly message threadingKoni Marti
implement message threading on the message store level using the jwz algorithm. Build threads on-the-fly when new message headers arrive. Use the references header to create the threads and the in-reply-to header as a fall-back option in case no references header is present. Does not run when the worker provides its own threading (e.g. imap server threads). Include only those message headers that have been fetched and are stored in the message store. References: https://www.jwz.org/doc/threading.html Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Inwit <inwit@sindominio.net> Tested-by: akspecs <akspecs@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>