Commit ad53929ef6ea275ee6d3e2a49fed9a7ecbda9271

Authored by Adhidarma Hadiwinoto
1 parent 5c1b4f6e88
Exists in master

abaikan jid == 'undefined'

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -60,6 +60,8 @@ function onUnsubscribe(sender) {
60 60 }
61 61  
62 62 function onBuddy(jid, state, statusText, resource) {
  63 + if (jid == 'undefined') {return; }
  64 +
63 65 logger.verbose('Buddy state change', {jid: jid, state: state, statusText: statusText, resource: resource});
64 66  
65 67 if (!matrix) {
... ... @@ -113,7 +115,7 @@ function init(_username, _password, _logger, _callbacks) {
113 115 xmpp.on('unsubscribe', onUnsubscribe);
114 116 xmpp.on('buddy', onBuddy);
115 117  
116   - //xmpp.unsubscribe();
  118 + xmpp.unsubscribe();
117 119  
118 120 xmpp.connect({
119 121 jid: username,