[messaging] fix empty history (#4218)

This commit is contained in:
Weiko
2024-02-28 14:32:05 +01:00
committed by GitHub
parent e0b2cc7651
commit 47656479ba

View File

@ -81,7 +81,7 @@ export class GmailPartialSyncService {
throw new Error('No history id found');
}
if (newHistoryId === lastSyncHistoryId) {
if (newHistoryId === lastSyncHistoryId || !history?.history?.length) {
this.logger.log(
`gmail partial-sync for workspace ${workspaceId} and account ${connectedAccountId} done with nothing to update.`,
);