Commit 9d281457 authored by JC Brand's avatar JC Brand

Bugfix. For reserved rooms, only render config form when they're new.

parent eb51c184
......@@ -990,7 +990,7 @@
},
onChatRoomPresence: function (pres) {
var $presence = $(pres), is_self;
var $presence = $(pres), is_self, new_room;
var nick = this.model.get('nick');
if ($presence.attr('type') === 'error') {
this.model.set('connection_status', Strophe.Status.DISCONNECTED);
......@@ -998,13 +998,15 @@
} else {
is_self = ($presence.find("status[code='110']").length) ||
($presence.attr('from') === this.model.get('id')+'/'+Strophe.escapeNode(nick));
if (this.model.get('connection_status') !== Strophe.Status.CONNECTED) {
new_room = $presence.find("status[code='201']").length;
if (is_self) {
this.model.set('connection_status', Strophe.Status.CONNECTED);
}
if (converse.muc_instant_rooms) {
this.hideSpinner().showStatusMessages(pres, is_self);
} else {
this.configureChatRoom();
if (!converse.muc_instant_rooms && new_room) {
this.configureChatRoom();
} else {
this.hideSpinner().showStatusMessages(pres, is_self);
}
}
}
this.occupantsview.updateOccupantsOnPresence(pres);
......
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