diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-07-26 07:22:19 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-07-26 22:24:28 +0200 |
commit | ea718fe146fa21f6899179a17e218a670b832ee8 (patch) | |
tree | bd5c1fa100057bd52b3568a7dffff6d0dc352d3a /worker | |
parent | 6db766260b7c23ec113e31010e0ac68105622956 (diff) | |
download | aerc-ea718fe146fa21f6899179a17e218a670b832ee8.zip |
imap: remove unused expunge codemaster
Remove unused code in the handleDeleteMessages routine. During
debugging, it was found that the channel for expunge updates was not
working and that all expunge details were coming through as
ExpungeUpdates. The reporting channel is unneeded.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker')
-rw-r--r-- | worker/imap/flags.go | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/worker/imap/flags.go b/worker/imap/flags.go index 5b2ac41..bda47e9 100644 --- a/worker/imap/flags.go +++ b/worker/imap/flags.go @@ -20,32 +20,12 @@ func (imapw *IMAPWorker) handleDeleteMessages(msg *types.DeleteMessages) { }, nil) return } - var deleted []uint32 - ch := make(chan uint32) - done := make(chan interface{}) - go func() { - defer logging.PanicHandler() - - for seqNum := range ch { - if uid, found := imapw.seqMap.Pop(seqNum); !found { - logging.Errorf("handleDeleteMessages unknown seqnum: %d", seqNum) - } else { - deleted = append(deleted, uid) - } - } - done <- nil - }() - if err := imapw.client.Expunge(ch); err != nil { + if err := imapw.client.Expunge(nil); err != nil { imapw.worker.PostMessage(&types.Error{ Message: types.RespondTo(msg), Error: err, }, nil) } else { - <-done - imapw.worker.PostMessage(&types.MessagesDeleted{ - Message: types.RespondTo(msg), - Uids: deleted, - }, nil) imapw.worker.PostMessage(&types.Done{Message: types.RespondTo(msg)}, nil) } } |