fix: skip IDLE if we got unsolicited FETCH (#6130)

This may indicate that there was a new \Seen flag
that we don't want to skip.

Also don't drain unsolicited responses while scanning folders. Now we
only drain unsolicited responses right before IDLE and always redo the
whole fetch cycle if there have been some. Some message in the scanned
folder may not be fetched that would be previously fetched otherwise,
but it will be picked up on the next folder scan.
This commit is contained in:
l
2024-10-30 02:38:15 +00:00
committed by GitHub
parent 9cb60f5f49
commit 55702e4985
3 changed files with 50 additions and 34 deletions

View File

@@ -32,7 +32,7 @@ impl Session {
self.select_with_uidvalidity(context, folder).await?;
if self.server_sent_unsolicited_exists(context)? {
if self.drain_unsolicited_responses(context)? {
self.new_mail = true;
}