Skip to content

Commit

Permalink
fix: fixed "Collection method find is synchronous" bug
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Dec 11, 2024
1 parent 6aa6709 commit 353bf76
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions helpers/imap-notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,14 @@ class IMAPNotifier extends EventEmitter {
// <https://github.com/nodemailer/wildduck/blob/c9188b3766b547b091d140a33308b5c3ec3aa1d4/imap-core/lib/imap-connection.js#L616-L619>
getUpdates(mailbox, modifyIndex, fn) {
modifyIndex = Number(modifyIndex) || 0;
Journals.collection
.find({
mailbox: mailbox._id || mailbox,
modseq: {
$gt: modifyIndex
}
})
.toArray(fn);
Journals.find({
mailbox: mailbox._id || mailbox,
modseq: {
$gt: modifyIndex
}
})
.lean()
.exec(fn);
}

// <https://github.com/nodemailer/wildduck/blob/48b9efb8ca4b300597b2e8f5ef4aa307ac97dcfe/lib/imap-notifier.js#L368>
Expand Down

0 comments on commit 353bf76

Please sign in to comment.