diff --git a/packages/client-sync/src/local-sync-worker/sync-worker.es6 b/packages/client-sync/src/local-sync-worker/sync-worker.es6 index d27b71a95..84a2e4a16 100644 --- a/packages/client-sync/src/local-sync-worker/sync-worker.es6 +++ b/packages/client-sync/src/local-sync-worker/sync-worker.es6 @@ -101,6 +101,8 @@ class SyncWorker { const {Message, Thread, Folder, Label} = this._db; const messagesWithoutFolder = await Message.findAll({ + attributes: ['id', 'threadId'], + limit: 1000, where: { folderId: null, isSent: {$not: true}, @@ -116,6 +118,8 @@ class SyncWorker { }) .map(syncbackRequest => syncbackRequest.props.messageId) const messagesWithoutImapUID = await Message.findAll({ + attributes: ['id', 'threadId'], + limit: 1000, where: { folderImapUID: null, },