Emit 'will-reconnect' event

This commit is contained in:
JC Brand 2017-02-01 17:36:20 +00:00
parent 65852f4e7c
commit 46e231b4b3

View File

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