diff --git a/lib/tasks/search-apply.js b/lib/tasks/search-apply.js index 113f5ef4..f71545fc 100644 --- a/lib/tasks/search-apply.js +++ b/lib/tasks/search-apply.js @@ -35,7 +35,7 @@ let run = async (task, data, options) => { } } - let cursor = await db.database.collection('messages').find(filter).sort({ uid: -1 }); + let cursor = await db.database.collection('messages').find(filter); let messageData; @@ -51,18 +51,6 @@ let run = async (task, data, options) => { if (action.moveTo && action.moveTo.toString() !== messageData.mailbox.toString()) { try { - console.log({ - user, - source: { - user: messageData.user, - mailbox: messageData.mailbox - }, - destination: { - mailbox: mailboxData._id - }, - updates: Object.keys(updates).length ? updates : false, - messageQuery: messageData.uid - }); await moveMessage({ user, source: {