[local-sync] fix duplicate ensure in sent folder

This commit is contained in:
Evan Morikawa 2017-01-13 19:31:15 -08:00
parent a5fec9e7a8
commit cd1548ac26

View file

@ -33,7 +33,7 @@ export async function getNewSyncbackTasks({db, account} = {}) {
.map((req) => SyncbackTaskFactory.create(account, req))
const tasks = await SyncbackRequest.findAll({
limit: 100,
where: {type: {$notIn: SendTaskTypes}, status: 'NEW'},
where: {type: {$notIn: [...SendTaskTypes, 'EnsureMessageInSentFolder']}, status: 'NEW'},
order: [['createdAt', 'ASC']],
})
.map((req) => SyncbackTaskFactory.create(account, req))