summary refs log tree commit diff stats
path: root/worker/imap/flags.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/imap/flags.go')
-rw-r--r--worker/imap/flags.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/worker/imap/flags.go b/worker/imap/flags.go
index 0122d8e..57211a6 100644
--- a/worker/imap/flags.go
+++ b/worker/imap/flags.go
@@ -9,7 +9,8 @@ import (
 func (imapw *IMAPWorker) handleDeleteMessages(msg *types.DeleteMessages) {
 	item := imap.FormatFlagsOp(imap.AddFlags, true)
 	flags := []interface{}{imap.DeletedFlag}
-	if err := imapw.client.UidStore(&msg.Uids, item, flags, nil); err != nil {
+	uids := toSeqSet(msg.Uids)
+	if err := imapw.client.UidStore(uids, item, flags, nil); err != nil {
 		imapw.worker.PostMessage(&types.Error{
 			Message: types.RespondTo(msg),
 			Error:   err,
@@ -49,7 +50,8 @@ func (imapw *IMAPWorker) handleReadMessages(msg *types.ReadMessages) {
 		item = imap.FormatFlagsOp(imap.RemoveFlags, true)
 		flags = []interface{}{imap.SeenFlag}
 	}
-	if err := imapw.client.UidStore(&msg.Uids, item, flags, nil); err != nil {
+	uids := toSeqSet(msg.Uids)
+	if err := imapw.client.UidStore(uids, item, flags, nil); err != nil {
 		imapw.worker.PostMessage(&types.Error{
 			Message: types.RespondTo(msg),
 			Error:   err,