Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/message-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class MessageHandler {

// get target mailbox data
// get target user data
// if throws will be handled by caller or wrapper
let [mailboxData, userData] = await Promise.all([this.getMailboxAsync(options), this.users.collection('users').findOne({ _id: options.user })]);

if (!userData) {
Expand Down Expand Up @@ -2201,8 +2202,8 @@ class MessageHandler {
this.notifier.addEntries(mailboxData, removeEntries, () => {
// mark messages as added to new mailbox
this.notifier.addEntries(targetData, existsEntries, () => {
removeEntries = [];
existsEntries = [];
removeEntries.length = 0; // Clear top-level argument array, setting length to 0 clears array object
existsEntries.length = 0;
this.notifier.fire(mailboxData.user);
return resolve(true);
});
Expand Down
Loading