Browse Source

Revert "Store session per full JID"

This reverts commit 607d7986651461eb912ef14081e247c9915d91f7.

Unfortunately this doesn't solve the issue because we have a
chicken-and-egg problem due to not knowing the resource beforehand.

So what happens after this change is that we never resume XEP-0198
sessions but instead always start a new one.
JC Brand 6 years ago
parent
commit
8d9d0a1ef4
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/headless/converse-core.js

+ 2 - 4
src/headless/converse-core.js

@@ -506,10 +506,8 @@ _converse.initConnection = function () {
 
 
 async function initUserSession (jid) {
-    // XXX: Important to use full JID, otherwise we run into a bug where two
-    // tabs with share the same XEP-0198 SM-ID, causing them to go into a
-    // reconnection-loop.
-    const id = `converse.session-${jid}`;
+    const bare_jid = Strophe.getBareJidFromJid(jid);
+    const id = `converse.session-${bare_jid}`;
     if (!_converse.session || _converse.session.get('id') !== id) {
         _converse.session = new Backbone.Model({id});
         _converse.session.browserStorage = new BrowserStorage.session(id);