From f913070600236e9298eb5703794665562a348987 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Thu, 4 Jul 2024 22:41:35 +0200 Subject: imap: expose extension in capabilities Expose the supported extensions in the capabilities. Signed-off-by: Koni Marti Acked-by: Robin Jarry --- worker/imap/worker.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'worker') diff --git a/worker/imap/worker.go b/worker/imap/worker.go index 391f365a..edb68ec4 100644 --- a/worker/imap/worker.go +++ b/worker/imap/worker.go @@ -128,10 +128,12 @@ func (w *IMAPWorker) newClient(c *client.Client) { lStatus, err := w.client.liststatus.SupportListStatus() if err == nil && lStatus { w.liststatus = true + w.caps.Extensions = append(w.caps.Extensions, "LIST-STATUS") w.worker.Debugf("Server Capability found: LIST-STATUS") } xgmext, err := w.client.Support("X-GM-EXT-1") if err == nil && xgmext && w.config.useXGMEXT { + w.caps.Extensions = append(w.caps.Extensions, "X-GM-EXT-1") w.worker.Debugf("Server Capability found: X-GM-EXT-1") w.worker = middleware.NewGmailWorker(w.worker, w.client.Client) } -- cgit