From 816dffb24279e1bce922a6c3f08dbf185728d9ed Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 8 May 2023 11:08:51 +0300 Subject: [PATCH] imap: NOTIFY delayed notifications sent soon after handling IMAP commands If a change happened within 1 second after any IMAP command was finished, the notification wasn't sent until some other change/command occurred. --- src/imap/imap-notify.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/imap/imap-notify.c b/src/imap/imap-notify.c index 4c0d0dd0db..83b2fd2363 100644 --- a/src/imap/imap-notify.c +++ b/src/imap/imap-notify.c @@ -424,6 +424,9 @@ static void imap_notify_watch_selected_mailbox(struct client *client) } mailbox_notify_changes(client->mailbox, imap_notify_callback, client); client->notify_ctx->watching_mailbox = TRUE; + /* There may have been changes before the mailbox notification watch + was added. Check that now. */ + imap_notify_callback(client->mailbox, client); } static void imap_notify_watch_timeout(struct client *client) -- 2.47.3