diff --git a/imap-notifier.js b/imap-notifier.js index 3354d720..af6440f7 100644 --- a/imap-notifier.js +++ b/imap-notifier.js @@ -92,6 +92,7 @@ class ImapNotifier extends EventEmitter { * @param {Function} callback Runs once the entry is either stored or an error occurred */ addEntries(username, path, entries, callback) { + this.logger.info('NOTIFY "%s":"%s" %s', username, path, JSON.stringify(entries)); if (entries && !Array.isArray(entries)) { entries = [entries]; } else if (!entries || !entries.length) { @@ -100,7 +101,6 @@ class ImapNotifier extends EventEmitter { entries.forEach(entry => { entry.created = new Date(); - this.logger.info('NOTIFY "%s":"%s" %s', username, path, JSON.stringify(entry)); }); this.database.collection('mailboxes').findOneAndUpdate({