aboutsummaryrefslogtreecommitdiffstats
path: root/worker
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2024-07-04 22:41:35 +0200
committerRobin Jarry <robin@jarry.cc>2024-08-04 18:24:42 +0200
commitf913070600236e9298eb5703794665562a348987 (patch)
tree1143203b02158352266e258ef89b590eff2bfa25 /worker
parent9ce6f71935945eb44a216d2efe37b1971f799c75 (diff)
downloadaerc-f913070600236e9298eb5703794665562a348987.tar.gz
imap: expose extension in capabilities
Expose the supported extensions in the capabilities. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker')
-rw-r--r--worker/imap/worker.go2
1 files changed, 2 insertions, 0 deletions
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)
}