mirror of
https://github.com/chatmail/core.git
synced 2026-04-05 23:22:11 +03:00
.wait_for_seen() is unreliable, because sometimes Dovecot sends only EXISTS to the IDLE connection, but not the FETCH. Dovecot sends updates like FETCH only if some connection has already observed the message in previous state without the \Seen flag. To avoid this race condition, wait until the core sets the flag, then FETCH the message manually and check that the flag is set.