aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-12-11 15:11:24 -0600
committerRobin Jarry <robin@jarry.cc>2022-12-14 11:24:49 +0100
commit683df439f8df5f53ee00e96eb6b9d525b1c41ea9 (patch)
tree5c7fcc44bfb0d514ae0dc3c20c4f976088463f12
parentadf74be4b5c55faa724d35ca7bea2603c3ef42f9 (diff)
downloadaerc-683df439f8df5f53ee00e96eb6b9d525b1c41ea9.tar.gz
maildir: send MessagesDeleted to UI when moving messages
The maildir worker sends a MessagesMoved message to the UI when messages are moved, enabling the destination directory to update it's counts. The filesystem watcher sees the move and updates the directory currently selected. However, an update of the UIDs in the msgstore is not completed as it is in other workers. All other works, via some mechanism (direct or EXPUNGE update) issue a MessagesDeleted message after a move. Send this message to the UI for the maildir worker to have it work as all other workers do. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
-rw-r--r--worker/maildir/worker.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index 45eca1d4..8c4d78ab 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -760,6 +760,10 @@ func (w *Worker) handleMoveMessages(msg *types.MoveMessages) error {
Destination: msg.Destination,
Uids: moved,
}, nil)
+ w.worker.PostMessage(&types.MessagesDeleted{
+ Message: types.RespondTo(msg),
+ Uids: moved,
+ }, nil)
return err
}