mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 00:06:06 +08:00
[local-sync] properly cleanup broken messages
This commit is contained in:
parent
04ff46eb04
commit
efba50bd9f
|
@ -96,9 +96,8 @@ class SyncWorker {
|
|||
const noFolderImapUID = await Message.findAll({
|
||||
where: {
|
||||
folderImapUID: null,
|
||||
isProcessed: true,
|
||||
},
|
||||
})
|
||||
}).filter(m => Date.now() - m.date > 10 * 60 * 1000) // 10 min
|
||||
const affectedThreadIds = new Set();
|
||||
await Promise.map(orphans.concat(noFolderImapUID), (msg) => {
|
||||
affectedThreadIds.add(msg.threadId);
|
||||
|
|
Loading…
Reference in a new issue