From 1d65778694e70aef0f247d84f590c6f0d09931b4 Mon Sep 17 00:00:00 2001 From: Chotiwat Chawannakul Date: Wed, 3 Oct 2012 18:10:27 +0700 Subject: [PATCH] Fix addKeywords method --- lib/imap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/imap.js b/lib/imap.js index b6de90d..9850c46 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -954,7 +954,7 @@ ImapConnection.prototype.addKeywords = function(uids, flags, cb) { }; ImapConnection.prototype._addKeywords = function(which, uids, flags, cb) { - if (!this._state.box._newKeywords) + if (!this._state.box.newKeywords) throw new Error('This mailbox does not allow new keywords to be added'); this._store(which, uids, flags, true, cb); }; @@ -1129,7 +1129,7 @@ ImapConnection.prototype._serverSupports = function(capability) { }; ImapConnection.prototype._store = function(which, uids, flags, isAdding, cb) { - var isKeywords = (arguments.callee.caller === this.addKeywords + var isKeywords = (arguments.callee.caller === this._addKeywords || arguments.callee.caller === this.delKeywords); if (this._state.status !== STATES.BOXSELECTED) throw new Error('No mailbox is currently selected');