2
0
Эх сурвалжийг харах

Try to fix what appears to be a timing bug

JC Brand 8 жил өмнө
parent
commit
ea04b11724

+ 1 - 1
src/converse-core.js

@@ -760,8 +760,8 @@
             // by browser.
             _converse.connection.flush();
 
-            _converse.initSession();
             _converse.setUserJid();
+            _converse.initSession();
             _converse.enableCarbons();
 
             // If there's no xmppstatus obj, then we were never connected to

+ 1 - 1
src/converse-muc.js

@@ -1717,7 +1717,7 @@
                     var item = sizzle('x[xmlns="'+Strophe.NS.MUC_USER+'"] item', pres).pop();
                     if (_.isNil(item)) { return; }
                     var jid = item.getAttribute('jid');
-                    if (utils.isSameBareJID(jid, _converse.bare_jid)) {
+                    if (utils.isSameBareJID(jid, _converse.connection.jid)) {
                         var affiliation = item.getAttribute('affiliation');
                         var role = item.getAttribute('role');
                         if (affiliation) {