From ad53929ef6ea275ee6d3e2a49fed9a7ecbda9271 Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <me@adhisimon.org> Date: Thu, 27 Oct 2016 18:22:48 +0700 Subject: [PATCH] abaikan jid == 'undefined' --- adaptor-xmpp.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adaptor-xmpp.js b/adaptor-xmpp.js index 0622af8..49ece0a 100644 --- a/adaptor-xmpp.js +++ b/adaptor-xmpp.js @@ -60,6 +60,8 @@ function onUnsubscribe(sender) { } function onBuddy(jid, state, statusText, resource) { + if (jid == 'undefined') {return; } + logger.verbose('Buddy state change', {jid: jid, state: state, statusText: statusText, resource: resource}); if (!matrix) { @@ -113,7 +115,7 @@ function init(_username, _password, _logger, _callbacks) { xmpp.on('unsubscribe', onUnsubscribe); xmpp.on('buddy', onBuddy); - //xmpp.unsubscribe(); + xmpp.unsubscribe(); xmpp.connect({ jid: username, -- 1.9.0