Connection: check UIDPLUS availability before attempting a UID EXPUNGE

fork
Brian White 11 years ago
parent 0e07b83230
commit 3c507f20bb

@ -477,6 +477,9 @@ Connection.prototype.expunge = function(uids, cb) {
validateUIDList(uids);
uids = uids.join(',');
if (!this.serverSupports('UIDPLUS'))
throw new Error('Server does not support this feature (UIDPLUS)');
this._enqueue('UID EXPUNGE ' + uids, cb);
} else
this._enqueue('EXPUNGE', cb);

Loading…
Cancel
Save