Clear the roster when a BOSH session can't be restored

Fixes #555
This commit is contained in:
JC Brand 2016-02-06 09:08:05 +00:00
parent 049782651c
commit 26b45be9e0
2 changed files with 7 additions and 3 deletions

View File

@ -6209,7 +6209,8 @@
try {
return this.connection.restore(this.jid, this.onConnectStatusChanged);
} catch (e) {
converse.log("Could not restore session for jid: "+this.jid+" Error message: "+e.message);
this.log("Could not restore session for jid: "+this.jid+" Error message: "+e.message);
this.clearSession(); // If there's a roster, we want to clear it (see #555)
}
} else { // Not keepalive
if (this.jid && this.sid && this.rid) {
@ -6241,7 +6242,8 @@
try {
return this.connection.restore(undefined, this.onConnectStatusChanged);
} catch (e) {
converse.log("Could not restore sessions. Error message: "+e.message);
this.log("Could not restore session. Error message: "+e.message);
this.clearSession(); // If there's a roster, we want to clear it (see #555)
}
}
if (this.auto_login) {

View File

@ -16,7 +16,9 @@
See [include_offline_state](https://conversejs.org/docs/html/configuration.html#include_offline_state) for details. [jcbrand]
- A chatroom invite might come from someone not in your roster list. [ben]
- #487 Empty the resources array when the resource is null [rlanvin]
- #559 Optimize auto_reconnect function. [m0cs]
- #534 Updated Russian translation [LaconicTranslator]
- #555 The status restored from sessionStorage is never updated [jcbrand]
- #559 Remove reconnection timer once connected succesfully [m0cs]
## 0.10.0 (2015-11-05)