From 683df439f8df5f53ee00e96eb6b9d525b1c41ea9 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Sun, 11 Dec 2022 15:11:24 -0600 Subject: 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 Tested-by: Bence Ferdinandy --- worker/maildir/worker.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'worker/maildir/worker.go') 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 } -- cgit