aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/worker.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-20 23:23:38 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-20 23:23:38 -0400
commit312a53e5ff721e0a29e34aaeceb0eece1203002d (patch)
treefb0c5f30d89f904d5fad4a900c910a1dd1d891be /worker/imap/worker.go
parentf3d3e0ed4f5dbf36b7a7c9762e6297083843f127 (diff)
downloadaerc-312a53e5ff721e0a29e34aaeceb0eece1203002d.tar.gz
Implement :delete-message
Diffstat (limited to 'worker/imap/worker.go')
-rw-r--r--worker/imap/worker.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index 16461651..ea7f317a 100644
--- a/worker/imap/worker.go
+++ b/worker/imap/worker.go
@@ -33,12 +33,14 @@ type IMAPWorker struct {
selected imap.MailboxStatus
updates chan client.Update
worker *types.Worker
+ // Map of sequence numbers to UIDs, index 0 is seq number 1
+ seqMap []uint32
}
func NewIMAPWorker(worker *types.Worker) *IMAPWorker {
return &IMAPWorker{
- worker: worker,
updates: make(chan client.Update, 50),
+ worker: worker,
}
}
@@ -156,6 +158,8 @@ func (w *IMAPWorker) handleMessage(msg types.WorkerMessage) error {
w.handleFetchDirectoryContents(msg)
case *types.FetchMessageHeaders:
w.handleFetchMessageHeaders(msg)
+ case *types.DeleteMessages:
+ w.handleDeleteMessages(msg)
default:
return errUnsupported
}