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) {
|
onChatBoxAdded: function (item) {
|
||||||
var view = this.get(item.get('id'));
|
var view = this.get(item.get('id'));
|
||||||
if (!view) {
|
if (!view) {
|
||||||
if (item.get('chatroom')) {
|
if (item.get('box_id') === 'controlbox') {
|
||||||
view = new converse.ChatRoomView({'model': item});
|
|
||||||
} else if (item.get('box_id') === 'controlbox') {
|
|
||||||
view = new converse.ControlBoxView({model: item});
|
view = new converse.ControlBoxView({model: item});
|
||||||
} else {
|
} else {
|
||||||
view = new converse.ChatBoxView({model: item});
|
view = new converse.ChatBoxView({model: item});
|
||||||
|
@ -123,6 +123,17 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
ChatBoxes: {
|
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 () {
|
registerMessageHandler: function () {
|
||||||
/* Override so that we can register a handler
|
/* Override so that we can register a handler
|
||||||
* for chat room invites.
|
* for chat room invites.
|
||||||
|
Loading…
Reference in New Issue
Block a user