Reconnect if we can't send a message due to dropped connection
This commit is contained in:
parent
f48adb386e
commit
1dd2c4ce7b
7
dist/converse.js
vendored
7
dist/converse.js
vendored
@ -49781,6 +49781,11 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_5__["default"].plugins
|
||||
|
||||
if (!_converse.connection.authenticated) {
|
||||
this.showHelpMessages(['Sorry, the connection has been lost, and your message could not be sent'], 'error');
|
||||
|
||||
if (!_converse.connection.reconnecting) {
|
||||
_converse.reconnect();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -63848,7 +63853,7 @@ _converse.initialize = async function (settings, callback) {
|
||||
_converse.tearDown();
|
||||
|
||||
_converse.logIn(null, true);
|
||||
}, 3000, {
|
||||
}, 2000, {
|
||||
'leading': true
|
||||
});
|
||||
|
||||
|
@ -922,6 +922,9 @@ converse.plugins.add('converse-chatview', {
|
||||
['Sorry, the connection has been lost, and your message could not be sent'],
|
||||
'error'
|
||||
);
|
||||
if (!_converse.connection.reconnecting) {
|
||||
_converse.reconnect();
|
||||
}
|
||||
return;
|
||||
}
|
||||
let spoiler_hint, hint_el = {};
|
||||
|
@ -691,7 +691,7 @@ _converse.initialize = async function (settings, callback) {
|
||||
_converse.connection.reconnecting = true;
|
||||
_converse.tearDown();
|
||||
_converse.logIn(null, true);
|
||||
}, 3000, {'leading': true});
|
||||
}, 2000, {'leading': true});
|
||||
|
||||
this.disconnect = function () {
|
||||
_converse.log('DISCONNECTED');
|
||||
|
2
src/headless/dist/converse-headless.js
vendored
2
src/headless/dist/converse-headless.js
vendored
@ -42361,7 +42361,7 @@ _converse.initialize = async function (settings, callback) {
|
||||
_converse.tearDown();
|
||||
|
||||
_converse.logIn(null, true);
|
||||
}, 3000, {
|
||||
}, 2000, {
|
||||
'leading': true
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user