summary refs log tree commit diff stats
path: root/worker/maildir/worker.go
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-07-11 09:44:53 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-12 11:26:39 -0400
commitd15ba24a2f0c177593533874ce3f4b70a47d832d (patch)
treef5b8af07e12bc7907c9ea6e4da5d0e8b12f0a1d9 /worker/maildir/worker.go
parent840b5bd633c4376f32e345e0a7fb9c45a6ceddfe (diff)
downloadaerc-d15ba24a2f0c177593533874ce3f4b70a47d832d.tar.gz
Implement maildir copy
Create a delivery in the destination directory with the content of the
source message.
Diffstat (limited to 'worker/maildir/worker.go')
-rw-r--r--worker/maildir/worker.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index f0c92ed..a5416cc 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -327,8 +327,9 @@ func (w *Worker) handleReadMessages(msg *types.ReadMessages) error {
 }
 
 func (w *Worker) handleCopyMessages(msg *types.CopyMessages) error {
-	// TODO: this.
-	return nil
+	defer w.done(msg)
+	dest := w.c.Dir(msg.Destination)
+	return w.c.CopyAll(dest, *w.selected, msg.Uids)
 }
 
 func (w *Worker) handleAppendMessage(msg *types.AppendMessage) error {