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
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
## 1.0.3 (Unreleased) ## 1.0.3 (Unreleased)
- Bugfix. Login form doesn't render after logging out, when `auto_reconnect = false` - Bugfix. Login form doesn't render after logging out, when `auto_reconnect = false`
[jcbrand] [jcbrand]
- Also indicate new day for the first day's messages. [jcbrand] - 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. - Chat bot messages don't appear when they have the same ids as their commands.
[jcbrand] [jcbrand]
- Updated onDisconnected method to fire disconnected event even if auto_reconnect is false. [kamranzafar]
## 1.0.2 (2016-05-24) ## 1.0.2 (2016-05-24)
...@@ -318,7 +319,7 @@ ...@@ -318,7 +319,7 @@
## 0.7.4 (2014-03-05) ## 0.7.4 (2014-03-05)
**note:** **note:**
*This release contains an important security fix. Thanks to Renaud Dubourguais from [Synacktiv](http://synacktiv.com) for reporting the vulnerability.* *This release contains an important security fix. Thanks to Renaud Dubourguais from [Synacktiv](http://synacktiv.com) for reporting the vulnerability.*
- #125 Bugfix: crypto dependencies loaded in wrong order [jcbrand] - #125 Bugfix: crypto dependencies loaded in wrong order [jcbrand]
......
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
} }
} }
}; };
this.detectLocale = function (library_check) { this.detectLocale = function (library_check) {
/* Determine which locale is supported by the user's system as well /* Determine which locale is supported by the user's system as well
* as by the relevant library (e.g. converse.js or moment.js). * as by the relevant library (e.g. converse.js or moment.js).
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
} }
return locale || 'en'; return locale || 'en';
}; };
if (!moment.locale) { //moment.lang is deprecated after 2.8.1, use moment.locale instead if (!moment.locale) { //moment.lang is deprecated after 2.8.1, use moment.locale instead
moment.locale = moment.lang; moment.locale = moment.lang;
} }
...@@ -442,8 +442,7 @@ ...@@ -442,8 +442,7 @@
}, 1000); }, 1000);
this.onDisconnected = function (condition) { this.onDisconnected = function (condition) {
if (!converse.auto_reconnect) { return 'disconnected'; } if (converse.disconnection_cause === Strophe.Status.CONNFAIL && converse.auto_reconnect) {
if (converse.disconnection_cause === Strophe.Status.CONNFAIL) {
converse.reconnect(condition); converse.reconnect(condition);
return 'reconnecting'; return 'reconnecting';
} else { } else {
...@@ -611,7 +610,7 @@ ...@@ -611,7 +610,7 @@
this.onStatusInitialized = function (deferred) { this.onStatusInitialized = function (deferred) {
this.registerIntervalHandler(); this.registerIntervalHandler();
this.roster = new this.RosterContacts(); this.roster = new this.RosterContacts();
this.roster.browserStorage = new Backbone.BrowserStorage[this.storage]( this.roster.browserStorage = new Backbone.BrowserStorage[this.storage](
b64_sha1('converse.contacts-'+this.bare_jid)); b64_sha1('converse.contacts-'+this.bare_jid));
......
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