mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-12-29 19:51:17 +08:00
Do not use sorting for mass action tasks
This commit is contained in:
parent
fd8b65b11f
commit
1aa9b9e14a
1 changed files with 1 additions and 13 deletions
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue