imap: avoid reconnection loop when message without Message-ID is marked as seen

- do not attempt to mark reserved meessages as seen when
  messages with empty Message-ID are marked as seen on IMAP
- do not reconnect on Seen flag synchronization failures This avoid
  reconnection loops in case of permanent errors in `sync_seen_flags`
This commit is contained in:
link2xt
2022-01-31 00:00:00 +00:00
parent c8f56d748a
commit f68088cfb5
3 changed files with 10 additions and 7 deletions

View File

@@ -1980,7 +1980,7 @@ async fn mark_seen_by_uid(
.sql
.query_row_optional(
"SELECT id, chat_id FROM msgs
WHERE rfc724_mid IN (
WHERE id > 9 AND rfc724_mid IN (
SELECT rfc724_mid FROM imap
WHERE folder=?1
AND uidvalidity=?2