Commit 8d9d0a1e authored by JC Brand's avatar JC Brand

Revert "Store session per full JID"

This reverts commit 607d7986.

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.
parent 98215deb
...@@ -506,10 +506,8 @@ _converse.initConnection = function () { ...@@ -506,10 +506,8 @@ _converse.initConnection = function () {
async function initUserSession (jid) { async function initUserSession (jid) {
// XXX: Important to use full JID, otherwise we run into a bug where two const bare_jid = Strophe.getBareJidFromJid(jid);
// tabs with share the same XEP-0198 SM-ID, causing them to go into a const id = `converse.session-${bare_jid}`;
// reconnection-loop.
const id = `converse.session-${jid}`;
if (!_converse.session || _converse.session.get('id') !== id) { if (!_converse.session || _converse.session.get('id') !== id) {
_converse.session = new Backbone.Model({id}); _converse.session = new Backbone.Model({id});
_converse.session.browserStorage = new BrowserStorage.session(id); _converse.session.browserStorage = new BrowserStorage.session(id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment