fix BOSH session restore

This commit is contained in:
Xavi Ferrer 2020-08-20 17:03:21 +02:00 committed by JC Brand
parent 8c799efc58
commit d50151c9dd

View File

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