From 00ef369670278a33ead740f82fd3022a239c2625 Mon Sep 17 00:00:00 2001 From: simonhochrein Date: Mon, 15 Feb 2016 17:22:57 -0600 Subject: [PATCH] Connection: remove deprecated JS API usage Fixes: https://github.com/mscdex/node-imap/issues/483 --- lib/Connection.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Connection.js b/lib/Connection.js index a62efce..1c7374f 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1126,7 +1126,7 @@ Connection.prototype.setKeywordsSince = function(uids, keywords, modseq, cb) { // END Extension methods ======================================================= // Namespace for seqno-based commands -Connection.prototype.__defineGetter__('seq', function() { +Object.defineProperty(Connection.prototype, 'seq', { get: function() { var self = this; return { delKeywords: function(seqnos, keywords, cb) { @@ -1222,7 +1222,7 @@ Connection.prototype.__defineGetter__('seq', function() { cb); } }; -}); +}}); Connection.prototype._resUntagged = function(info) { var type = info.type, i, len, box, attrs, key; @@ -1708,7 +1708,6 @@ Connection.prototype._starttls = function() { self._sock.on('timeout', this._onSocketTimeout); self._sock.setTimeout(self._config.socketTimeout); - self._parser.setStream(self._sock); }); };