Merge branch 'main' into dev

This commit is contained in:
Wayne
2025-08-17 17:40:55 +03:00
2 changed files with 5 additions and 2 deletions

View File

@@ -189,7 +189,10 @@ export class ImapConnector implements IEmailConnector {
currentMaxUid = lastMessage.uid;
}
}
this.newMaxUids[mailboxPath] = currentMaxUid;
// Initialize with last synced UID, not the maximum UID in mailbox
this.newMaxUids[mailboxPath] = lastUid || 0;
// Only fetch if the mailbox has messages, to avoid errors on empty mailboxes with some IMAP servers.
if (mailbox.exists > 0) {

View File

@@ -230,7 +230,7 @@ export class MicrosoftConnector implements IEmailConnector {
try {
const response = await this.graphClient
.api(requestUrl)
.select('id,conversationId,@removed')
.select('id,conversationId')
.get();
for (const message of response.value) {