This commit is contained in:
Andris Reinman 2017-03-12 13:22:30 +02:00
parent 72512fbce7
commit 14b16799fa

View file

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