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');