Found more chatroom specific code in converse-core.js
This commit is contained in:
parent
a4fd252a30
commit
9ae2f71747
@ -2284,9 +2284,7 @@
|
||||
onChatBoxAdded: function (item) {
|
||||
var view = this.get(item.get('id'));
|
||||
if (!view) {
|
||||
if (item.get('chatroom')) {
|
||||
view = new converse.ChatRoomView({'model': item});
|
||||
} else if (item.get('box_id') === 'controlbox') {
|
||||
if (item.get('box_id') === 'controlbox') {
|
||||
view = new converse.ControlBoxView({model: item});
|
||||
} else {
|
||||
view = new converse.ChatBoxView({model: item});
|
||||
|
@ -123,6 +123,17 @@
|
||||
},
|
||||
|
||||
ChatBoxes: {
|
||||
onChatBoxAdded: function (item) {
|
||||
var view = this.get(item.get('id'));
|
||||
if (!view && item.get('chatroom')) {
|
||||
view = new converse.ChatRoomView({'model': item});
|
||||
this.add(item.get('id'), view);
|
||||
this.trimChats(view);
|
||||
} else {
|
||||
this._super.onChatBoxAdded.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
registerMessageHandler: function () {
|
||||
/* Override so that we can register a handler
|
||||
* for chat room invites.
|
||||
|
Loading…
Reference in New Issue
Block a user