Commit b82e0f31 authored by Kamran's avatar Kamran Committed by JC Brand

Fix for issue #648 (#649)

* Updated onDisconnected method to fire disconnected event. Issue #648

* Updated docs/CHANGES.md
parent 619d970f
......@@ -7,6 +7,7 @@
- Also indicate new day for the first day's messages. [jcbrand]
- Chat bot messages don't appear when they have the same ids as their commands.
[jcbrand]
- Updated onDisconnected method to fire disconnected event even if auto_reconnect is false. [kamranzafar]
## 1.0.2 (2016-05-24)
......
......@@ -442,8 +442,7 @@
}, 1000);
this.onDisconnected = function (condition) {
if (!converse.auto_reconnect) { return 'disconnected'; }
if (converse.disconnection_cause === Strophe.Status.CONNFAIL) {
if (converse.disconnection_cause === Strophe.Status.CONNFAIL && converse.auto_reconnect) {
converse.reconnect(condition);
return 'reconnecting';
} else {
......
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