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,