From 9333c3a3a0426c02fe7c280673f5ead98c45982f Mon Sep 17 00:00:00 2001 From: mscdex Date: Sat, 29 Jun 2013 17:07:32 -0400 Subject: [PATCH] removeDeleted() -> expunge() --- README.md | 2 +- lib/Connection.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e3d7e1d..a1598ac 100644 --- a/README.md +++ b/README.md @@ -471,7 +471,7 @@ Connection Instance Methods } ``` -* **removeDeleted**(< _function_ >callback) - _(void)_ - Permanently removes (EXPUNGEs) all messages flagged as Deleted in the currently open mailbox. `callback` has 1 parameter: < _Error_ >err. **Note:** At least on Gmail, performing this operation with any currently open mailbox that is not the Spam or Trash mailbox will merely archive any messages marked as Deleted (by moving them to the 'All Mail' mailbox). +* **expunge**(< _function_ >callback) - _(void)_ - Permanently removes all messages flagged as Deleted in the currently open mailbox. `callback` has 1 parameter: < _Error_ >err. **Note:** At least on Gmail, performing this operation with any currently open mailbox that is not the Spam or Trash mailbox will merely archive any messages marked as Deleted (by moving them to the 'All Mail' mailbox). * **append**(< _mixed_ >msgData, [< _object_ >options,] < _function_ >callback) - _(void)_ - Appends a message to selected mailbox. `msgData` is a string or Buffer containing an RFC-822 compatible MIME message. Valid `options` properties are: diff --git a/lib/Connection.js b/lib/Connection.js index 654494d..73480bc 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -374,7 +374,7 @@ Connection.prototype.status = function(boxName, cb) { cb); }; -Connection.prototype.removeDeleted = function(uids, cb) { +Connection.prototype.expunge = function(uids, cb) { if (typeof uids === 'function') { cb = uids; uids = undefined; @@ -551,9 +551,9 @@ Connection.prototype._move = function(which, uids, boxTo, cb) { self.seq.addFlags(uids, 'Deleted', cbMarkDel); } else if (task === 3) { if (which && self.serverSupports('UIDPLUS')) - self.removeDeleted(uids, cb); + self.expunge(uids, cb); else { - self.removeDeleted(function(e) { + self.expunge(function(e) { ++task; ccb(e, info); });