Commit be363af3c0b02fce454470e1c0a364e619b1b261
1 parent
4c467b489a
Exists in
master
hapus undefined resource jika ada resource lain
Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff
adaptor-xmpp.js
... | ... | @@ -81,6 +81,13 @@ function onBuddy(jid, state, statusText, resource) { |
81 | 81 | statusText: statusText, |
82 | 82 | lastUpdate: moment().format('YYYY-MM-DD HH:mm:ss') |
83 | 83 | } |
84 | + | |
85 | + if (resource != 'undefined' && matrix.buddies[jid].resources.undefined) { | |
86 | + try { | |
87 | + delete matrix.buddies[jid].resources.undefined; | |
88 | + } | |
89 | + catch(e) {}; | |
90 | + } | |
84 | 91 | } |
85 | 92 | |
86 | 93 | function isPartnerOffline(partner) { |