diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-10-04 10:08:19 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-10-04 10:19:40 +0200 |
commit | d99b6081f7464e332fbad4e79d6004a8a8698e2f (patch) | |
tree | 31c8127bcca2a7814a7bb1281b99c590b795ab68 /worker | |
parent | d3b62dd3b0fe6f5f1fb52e4fa9247cf9b27cbb3c (diff) | |
download | aerc-d99b6081f7464e332fbad4e79d6004a8a8698e2f.tar.gz |
imap: fix flags update
Fixes updating the flags in the imap backend. Before, the silent flag
was set incorrectly by 75fc42e ("imap: send message info updates for
bulk flag ops") which caused some imap servers to not send the updated
flags. By disabling the silent flag, the flag update will return a
corrsponding value that we can send back to the message store to update
the flags correctly.
Fixes: 75fc42e ("imap: send message info updates for bulk flag ops")
Reported-by: Jens Grassel <jens@wegtam.com>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Jens Grassel <jens@wegtam.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker')
-rw-r--r-- | worker/imap/flags.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/worker/imap/flags.go b/worker/imap/flags.go index ccb8c107..7ff6de37 100644 --- a/worker/imap/flags.go +++ b/worker/imap/flags.go @@ -30,10 +30,10 @@ func (imapw *IMAPWorker) handleDeleteMessages(msg *types.DeleteMessages) { } func (imapw *IMAPWorker) handleAnsweredMessages(msg *types.AnsweredMessages) { - item := imap.FormatFlagsOp(imap.AddFlags, true) + item := imap.FormatFlagsOp(imap.AddFlags, false) flags := []interface{}{imap.AnsweredFlag} if !msg.Answered { - item = imap.FormatFlagsOp(imap.RemoveFlags, true) + item = imap.FormatFlagsOp(imap.RemoveFlags, false) flags = []interface{}{imap.AnsweredFlag} } imapw.handleStoreOps(msg, msg.Uids, item, flags, @@ -51,9 +51,9 @@ func (imapw *IMAPWorker) handleAnsweredMessages(msg *types.AnsweredMessages) { func (imapw *IMAPWorker) handleFlagMessages(msg *types.FlagMessages) { flags := []interface{}{flagToImap[msg.Flag]} - item := imap.FormatFlagsOp(imap.AddFlags, true) + item := imap.FormatFlagsOp(imap.AddFlags, false) if !msg.Enable { - item = imap.FormatFlagsOp(imap.RemoveFlags, true) + item = imap.FormatFlagsOp(imap.RemoveFlags, false) } imapw.handleStoreOps(msg, msg.Uids, item, flags, func(_msg *imap.Message) error { |