aboutsummaryrefslogtreecommitdiffstats
path: root/worker
diff options
context:
space:
mode:
Diffstat (limited to 'worker')
-rw-r--r--worker/imap/movecopy.go5
-rw-r--r--worker/maildir/worker.go17
-rw-r--r--worker/types/messages.go6
3 files changed, 15 insertions, 13 deletions
diff --git a/worker/imap/movecopy.go b/worker/imap/movecopy.go
index 0b19ead3..f1f2b45d 100644
--- a/worker/imap/movecopy.go
+++ b/worker/imap/movecopy.go
@@ -14,6 +14,11 @@ func (imapw *IMAPWorker) handleCopyMessages(msg *types.CopyMessages) {
Error: err,
}, nil)
} else {
+ imapw.worker.PostMessage(&types.MessagesCopied{
+ Message: types.RespondTo(msg),
+ Destination: msg.Destination,
+ Uids: msg.Uids,
+ }, nil)
imapw.worker.PostMessage(&types.Done{Message: types.RespondTo(msg)}, nil)
}
}
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index d3de8447..0a51ea7f 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -536,11 +536,6 @@ func (w *Worker) handleDeleteMessages(msg *types.DeleteMessages) error {
w.worker.Logger.Printf("error removing some messages: %v", err)
return err
}
-
- w.worker.PostMessage(&types.DirectoryInfo{
- Info: w.getDirectoryInfo(w.selectedName),
- }, nil)
-
return nil
}
@@ -617,15 +612,11 @@ func (w *Worker) handleCopyMessages(msg *types.CopyMessages) error {
if err != nil {
return err
}
-
- w.worker.PostMessage(&types.DirectoryInfo{
- Info: w.getDirectoryInfo(w.selectedName),
- }, nil)
-
- w.worker.PostMessage(&types.DirectoryInfo{
- Info: w.getDirectoryInfo(msg.Destination),
+ w.worker.PostMessage(&types.MessagesCopied{
+ Message: types.RespondTo(msg),
+ Destination: msg.Destination,
+ Uids: msg.Uids,
}, nil)
-
return nil
}
diff --git a/worker/types/messages.go b/worker/types/messages.go
index 5cd3768c..d2d98fdf 100644
--- a/worker/types/messages.go
+++ b/worker/types/messages.go
@@ -218,6 +218,12 @@ type MessagesDeleted struct {
Uids []uint32
}
+type MessagesCopied struct {
+ Message
+ Destination string
+ Uids []uint32
+}
+
type ModifyLabels struct {
Message
Uids []uint32