|
@@ -876,30 +876,29 @@
|
|
* (String) exit_msg: Optional message to indicate your
|
|
* (String) exit_msg: Optional message to indicate your
|
|
* reason for leaving.
|
|
* reason for leaving.
|
|
*/
|
|
*/
|
|
|
|
+ this.hide();
|
|
this.occupantsview.model.reset();
|
|
this.occupantsview.model.reset();
|
|
this.occupantsview.model.browserStorage._clear();
|
|
this.occupantsview.model.browserStorage._clear();
|
|
-
|
|
|
|
if (!converse.connection.connected ||
|
|
if (!converse.connection.connected ||
|
|
this.model.get('connection_status') === Strophe.Status.DISCONNECTED) {
|
|
this.model.get('connection_status') === Strophe.Status.DISCONNECTED) {
|
|
// Don't send out a stanza if we're not connected.
|
|
// Don't send out a stanza if we're not connected.
|
|
this.cleanup();
|
|
this.cleanup();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- var presenceid = converse.connection.getUniqueId();
|
|
|
|
var presence = $pres({
|
|
var presence = $pres({
|
|
type: "unavailable",
|
|
type: "unavailable",
|
|
- id: presenceid,
|
|
|
|
from: converse.connection.jid,
|
|
from: converse.connection.jid,
|
|
to: this.getRoomJIDAndNick()
|
|
to: this.getRoomJIDAndNick()
|
|
});
|
|
});
|
|
if (exit_msg !== null) {
|
|
if (exit_msg !== null) {
|
|
presence.c("status", exit_msg);
|
|
presence.c("status", exit_msg);
|
|
}
|
|
}
|
|
- converse.connection.addHandler(
|
|
|
|
|
|
+ converse.connection.sendPresence(
|
|
|
|
+ presence,
|
|
|
|
+ this.cleanup.bind(this),
|
|
this.cleanup.bind(this),
|
|
this.cleanup.bind(this),
|
|
- null, "presence", null, presenceid
|
|
|
|
|
|
+ 2000
|
|
);
|
|
);
|
|
- converse.connection.send(presence);
|
|
|
|
},
|
|
},
|
|
|
|
|
|
renderConfigurationForm: function (stanza) {
|
|
renderConfigurationForm: function (stanza) {
|