Commit d50151c9 authored by Xavi Ferrer's avatar Xavi Ferrer Committed by JC Brand

fix BOSH session restore

parent 8c799efc
...@@ -63,7 +63,7 @@ converse.plugins.add('converse-bosh', { ...@@ -63,7 +63,7 @@ converse.plugins.add('converse-bosh', {
jid, jid,
data.sid, data.sid,
data.rid, data.rid,
_converse.onConnectStatusChanged _converse.connection.onConnectStatusChanged
); );
} else { } else {
xhr.onerror(); xhr.onerror();
...@@ -87,7 +87,7 @@ converse.plugins.add('converse-bosh', { ...@@ -87,7 +87,7 @@ converse.plugins.add('converse-bosh', {
const jid = (await initBOSHSession()).get('jid'); const jid = (await initBOSHSession()).get('jid');
if (jid && (_converse.connection._proto instanceof Strophe.Bosh)) { if (jid && (_converse.connection._proto instanceof Strophe.Bosh)) {
try { try {
_converse.connection.restore(jid, _converse.onConnectStatusChanged); _converse.connection.restore(jid, _converse.connection.onConnectStatusChanged);
return true; return true;
} catch (e) { } catch (e) {
!_converse.isTestEnv() && log.warn("Could not restore session for jid: "+jid+" Error message: "+e.message); !_converse.isTestEnv() && log.warn("Could not restore session for jid: "+jid+" Error message: "+e.message);
......
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