diff --git a/lib/Connection.js b/lib/Connection.js index bd31e98b..2201e026 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -68,6 +68,7 @@ function Connection(config) { password: config.password, xoauth: config.xoauth, xoauth2: config.xoauth2, + id: config.id ? config.id : null, connTimeout: config.connTimeout || 10000, authTimeout: config.authTimeout || 5000, keepalive: (config.keepalive === undefined || config.keepalive === null @@ -1613,7 +1614,10 @@ Connection.prototype._login = function() { self.emit('error', err); return self._sock.end(); } - + // set client meta + if (self._config.id) { + self._enqueue(`ID ("name" "${escape(self._config.id.name)}" "version" "${escape(self._config.id.version)}" "vendor" "${escape(self._config.id.vendor)}")`, reentry); + } // 2. Get the list of available namespaces (RFC2342) if (!checkedNS && self.serverSupports('NAMESPACE')) { checkedNS = true;