Commit 46e231b4 authored by JC Brand's avatar JC Brand

Emit 'will-reconnect' event

parent 65852f4e
...@@ -436,6 +436,7 @@ ...@@ -436,6 +436,7 @@
/* In this case, we reconnect, because we might be receiving /* In this case, we reconnect, because we might be receiving
* expirable tokens from the credentials_url. * expirable tokens from the credentials_url.
*/ */
converse.emit('will-reconnect');
return converse.reconnect(); return converse.reconnect();
} else { } else {
return converse.disconnect(); return converse.disconnect();
...@@ -445,6 +446,7 @@ ...@@ -445,6 +446,7 @@
!converse.auto_reconnect) { !converse.auto_reconnect) {
return converse.disconnect(); return converse.disconnect();
} }
converse.emit('will-reconnect');
converse.reconnect(); converse.reconnect();
}; };
......
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