aboutsummaryrefslogtreecommitdiffstats
path: root/worker
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-13 20:23:23 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-13 20:23:23 -0400
commit3ace4ef73245577d5d407f48a8214de72b70b57d (patch)
treec8d739ab69343cb09bbd735dcdb1d861ea96b7c5 /worker
parent026e8a17ca40955652949584388b38566fef66e7 (diff)
downloadaerc-3ace4ef73245577d5d407f48a8214de72b70b57d.tar.gz
Handle external message deletions
Diffstat (limited to 'worker')
-rw-r--r--worker/imap/worker.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index 3d4555f1..d0b0e712 100644
--- a/worker/imap/worker.go
+++ b/worker/imap/worker.go
@@ -204,6 +204,13 @@ func (w *IMAPWorker) handleImapUpdate(update client.Update) {
Recent: int(status.Recent),
Unseen: int(status.Unseen),
}, nil)
+ case *client.ExpungeUpdate:
+ i := update.SeqNum - 1
+ uid := w.seqMap[i]
+ w.seqMap = append(w.seqMap[:i], w.seqMap[i+1:]...)
+ w.worker.PostMessage(&types.MessagesDeleted{
+ Uids: []uint32{uid},
+ }, nil)
}
}