fix: imap server (#227)

This commit is contained in:
Dream Hunter
2024-05-12 17:47:01 +08:00
committed by GitHub
parent 3fc8bba234
commit edc110b6ac
4 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ class SimpleMailbox:
def fetch(self, messages, uid):
start, end = messages.ranges[0]
start = max(start, 1)
if start > self.message_count:
if self.message_count > 0 and start > self.message_count:
return []
res = requests.get(
f"{settings.proxy_url}/api/mails?limit=20&offset={start - 1}", headers={