Merge pull request #23347 from surajshetty3416/fix-email-pulling

This commit is contained in:
Suraj Shetty 2023-11-22 13:57:37 +05:30 committed by GitHub
commit 2b2a7d44f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,11 +236,6 @@ class EmailServer:
EmailAccount.uidnext, uidnext
).where(EmailAccount.name == self.settings.email_account_name).run()
# uid validity not found pulling emails for first time
if not uid_validity:
self.settings.email_sync_rule = "UNSEEN"
return
sync_count = 100 if uid_validity else int(self.settings.initial_sync_count)
from_uid = (
1 if uidnext < (sync_count + 1) or (uidnext - sync_count) < 1 else uidnext - sync_count