From b4f896fae4d5b642a5a84e3aa872aeab89d040c4 Mon Sep 17 00:00:00 2001 From: Revadike Date: Thu, 13 Oct 2022 00:07:30 +0200 Subject: [PATCH] Remove log + force update --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 71993ec..1bcd005 100644 --- a/index.js +++ b/index.js @@ -56,14 +56,15 @@ MailListener.prototype.stop = function() { }; MailListener.prototype.restart = function() { - console.log('detaching existing listener'); this.imap.removeAllListeners('mail'); this.imap.removeAllListeners('update'); - - console.log('calling imap connect'); this.imap.connect(); }; +MailListener.prototype.sync = MailListener.prototype.refresh = MailListener.prototype.update = function() { + this.imap.emit('update'); +} + function imapReady() { var self = this; this.imap.openBox(this.mailbox, false, function(err, mailbox) { @@ -165,7 +166,6 @@ function parseUnread() { self.emit('error', err); }); }, function (err) { - console.log('all process'); if (err) { self.emit('error', err); }