diff --git a/packages/local-sync/src/local-sync-worker/syncback-tasks/move-thread-to-folder.imap.js b/packages/local-sync/src/local-sync-worker/syncback-tasks/move-thread-to-folder.imap.js index 50f2b9ab7..dd9ccad85 100644 --- a/packages/local-sync/src/local-sync-worker/syncback-tasks/move-thread-to-folder.imap.js +++ b/packages/local-sync/src/local-sync-worker/syncback-tasks/move-thread-to-folder.imap.js @@ -49,7 +49,7 @@ class MoveThreadToFolderIMAP extends SyncbackTask { // If IMAP succeeds, save the model updates await sequelize.transaction(async (transaction) => { await Promise.all(threadMessages.map(async (m) => { - await m.update({folderImapUID: null}, transaction) + await m.update({folderImapUID: null}, {transaction}) await m.setFolder(targetFolder, {transaction}) })) await thread.setFolders([targetFolder], {transaction}) diff --git a/packages/local-sync/src/local-sync-worker/syncback-tasks/set-thread-folder-and-labels.imap.js b/packages/local-sync/src/local-sync-worker/syncback-tasks/set-thread-folder-and-labels.imap.js index 2a2b0ee73..5aff8ca92 100644 --- a/packages/local-sync/src/local-sync-worker/syncback-tasks/set-thread-folder-and-labels.imap.js +++ b/packages/local-sync/src/local-sync-worker/syncback-tasks/set-thread-folder-and-labels.imap.js @@ -53,7 +53,7 @@ class SetThreadFolderAndLabelsIMAP extends SyncbackTask { // If IMAP succeeds, save the model updates await sequelize.transaction(async (transaction) => { await Promise.all(threadMessages.map(async (m) => { - await m.update({folderImapUID: null}, transaction) + await m.update({folderImapUID: null}, {transaction}) await m.setLabels(labelIds, {transaction}) await m.setFolder(targetFolder, {transaction}) }))