Commit 2ae2a1b5 authored by JC Brand's avatar JC Brand

Updated a bit to make it clearer.

parent 305559a8
...@@ -1773,27 +1773,26 @@ ...@@ -1773,27 +1773,26 @@
} }
var show_status_messages = true; var show_status_messages = true;
var is_self = pres.querySelector("status[code='110']"); var is_self = pres.querySelector("status[code='110']");
var new_room = pres.querySelector("status[code='201']"); var locked_room = pres.querySelector("status[code='201']");
if (is_self) { if (is_self) {
this.saveAffiliationAndRole(pres); this.saveAffiliationAndRole(pres);
} if (locked_room) {
if (is_self && new_room) { // This is a new room. It will now be configured
// This is a new room. It will now be configured // and the configuration cached on the Backbone.Model.
// and the configuration cached on the if (_converse.muc_instant_rooms) {
// Backbone.Model. this.createInstantRoom(); // Accept default configuration
if (_converse.muc_instant_rooms) { } else {
this.createInstantRoom(); // Accept default configuration this.configureChatRoom();
} else { if (!this.model.get('auto_configure')) {
this.configureChatRoom(); // We don't show status messages if the
if (!this.model.get('auto_configure')) { // configuration form is being shown.
// We don't show status messages if the show_status_messages = false;
// configuration form is being shown. }
show_status_messages = false;
} }
} }
} else if (!this.model.get('features_fetched') && }
this.model.get('connection_status') !== Strophe.Status.CONNECTED) { if (!locked_room && !this.model.get('features_fetched') &&
this.model.get('connection_status') !== Strophe.Status.CONNECTED) {
// The features for this room weren't fetched yet, perhaps // The features for this room weren't fetched yet, perhaps
// because it's a new room without locking (in which // because it's a new room without locking (in which
// case Prosody doesn't send a 201 status). // case Prosody doesn't send a 201 status).
......
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