mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 15:36:30 +03:00
Ensure the client does not busy loop skipping IDLE if UIDNEXT of the mailbox is higher than the last seen UID plus 1, e.g. if the message with UID=UIDNEXT-1 was deleted before we fetched it. We do not fallback to UIDNEXT=1 anymore if the STATUS command cannot determine UIDNEXT. There are no known IMAP servers with broken STATUS so far. This allows to guarantee that select_with_uidvalidity() sets UIDNEXT for the mailbox and use it in fetch_new_messages() to ensure that UIDNEXT always advances even when there are no messages to fetch.