Connection: rename 'deleted' event name to 'expunge'

fork
mscdex 11 years ago
parent f942ede18a
commit b06599ceb2

@ -323,7 +323,7 @@ Connection Events
* **mail**(< _integer_ >numNewMsgs) - Emitted when new mail arrives in the currently open mailbox.
* **deleted**(< _integer_ >seqno) - Emitted when a message is deleted from another IMAP connection's session. `seqno` is the sequence number (instead of the unique UID) of the message that was deleted. If you are caching sequence numbers, all sequence numbers higher than this value **MUST** be decremented by 1 in order to stay synchronized with the server and to keep correct continuity.
* **expunge**(< _integer_ >seqno) - Emitted when a message was expunged externally. `seqno` is the sequence number (instead of the unique UID) of the message that was expunged. If you are caching sequence numbers, all sequence numbers higher than this value **MUST** be decremented by 1 in order to stay synchronized with the server and to keep correct continuity.
* **update**(< _integer_ >seqno, < _object_ >info) - Emitted when message metadata (e.g. flags) changes externally.

@ -980,7 +980,7 @@ Connection.prototype._resUntagged = function(info) {
if (this._box.messages.total > 0)
--this._box.messages.total;
if (!this._curReq)
this.emit('deleted', info.num);
this.emit('expunge', info.num);
} else if (type === 'ok') {
if (this.state === 'connected' && !this._curReq)
this._login();

Loading…
Cancel
Save