From e0d279d6128a22db56326557883ad790544bc4f7 Mon Sep 17 00:00:00 2001 From: jp39 Date: Tue, 8 Nov 2022 10:52:12 +0100 Subject: imap: add support for ORDEREDSUBJECT threading algorithm The imap worker incorrectly tries to use the REFERENCES threading algorithm by default although some servers only support the ORDEREDSUBJECT threading algorithm. Use whichever threading algorithm is advertised as supported by the server, buf prefer REFERENCES if available. Signed-off-by: jp39 Acked-by: Tim Culverhouse --- worker/imap/open.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'worker/imap/open.go') diff --git a/worker/imap/open.go b/worker/imap/open.go index c734ba8b..f3f20a59 100644 --- a/worker/imap/open.go +++ b/worker/imap/open.go @@ -115,7 +115,7 @@ func (imapw *IMAPWorker) handleDirectoryThreaded( }, nil) return } - threads, err := imapw.client.thread.UidThread(sortthread.References, + threads, err := imapw.client.thread.UidThread(imapw.threadAlgorithm, searchCriteria) if err != nil { imapw.worker.PostMessage(&types.Error{ -- cgit