Commit 7fc3151e authored by JC Brand's avatar JC Brand

Fixes #1783

parent 5809c978
...@@ -90,7 +90,7 @@ converse.plugins.add('converse-bosh', { ...@@ -90,7 +90,7 @@ converse.plugins.add('converse-bosh', {
_converse.restoreBOSHSession = async function () { _converse.restoreBOSHSession = async function () {
const jid = (await initBOSHSession()).get('jid'); const jid = (await initBOSHSession()).get('jid');
if (jid) { if (jid && (_converse.connection._proto instanceof Strophe.Bosh)) {
try { try {
_converse.connection.restore(jid, _converse.onConnectStatusChanged); _converse.connection.restore(jid, _converse.onConnectStatusChanged);
return true; return true;
......
...@@ -1397,7 +1397,8 @@ _converse.api = { ...@@ -1397,7 +1397,8 @@ _converse.api = {
} }
// See whether there is a BOSH session to re-attach to // See whether there is a BOSH session to re-attach to
if (_.invoke(_converse.pluggable.plugins['converse-bosh'], 'enabled')) { const bosh_plugin = _converse.pluggable.plugins['converse-bosh'];
if (bosh_plugin && bosh_plugin.enabled()) {
if (await _converse.restoreBOSHSession()) { if (await _converse.restoreBOSHSession()) {
return; return;
} else if (_converse.authentication === _converse.PREBIND && (!automatic || _converse.auto_login)) { } else if (_converse.authentication === _converse.PREBIND && (!automatic || _converse.auto_login)) {
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
muc_respect_autojoin: true, muc_respect_autojoin: true,
view_mode: 'fullscreen', view_mode: 'fullscreen',
websocket_url: 'ws://chat.example.org:5380/xmpp-websocket', websocket_url: 'ws://chat.example.org:5380/xmpp-websocket',
// bosh_service_url: 'http://chat.example.org:5280/http-bind',
muc_show_logs_before_join: true, muc_show_logs_before_join: true,
whitelisted_plugins: ['converse-debug'], whitelisted_plugins: ['converse-debug'],
}); });
......
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