|
@@ -102,12 +102,11 @@
|
|
|
},
|
|
|
|
|
|
onChatBoxesFetched (collection, resp) {
|
|
|
- const { _converse } = this.__super__;
|
|
|
this.__super__.onChatBoxesFetched.apply(this, arguments);
|
|
|
+ const { _converse } = this.__super__;
|
|
|
if (!_.includes(_.map(collection, 'id'), 'controlbox')) {
|
|
|
- _converse.addControlBox();
|
|
|
+ _converse.addControlBox({'connected': true});
|
|
|
}
|
|
|
- this.get('controlbox').save({connected:true});
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -159,7 +158,6 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
-
|
|
|
ChatBox: {
|
|
|
initialize () {
|
|
|
if (this.get('id') === 'controlbox') {
|
|
@@ -170,7 +168,6 @@
|
|
|
},
|
|
|
},
|
|
|
|
|
|
-
|
|
|
ChatBoxView: {
|
|
|
insertIntoDOM () {
|
|
|
const { _converse } = this.__super__;
|
|
@@ -199,14 +196,14 @@
|
|
|
|
|
|
const LABEL_CONTACTS = __('Contacts');
|
|
|
|
|
|
- _converse.addControlBox = () =>
|
|
|
- _converse.chatboxes.add({
|
|
|
+ _converse.addControlBox = (settings) => {
|
|
|
+ _converse.chatboxes.add(_.assign({
|
|
|
id: 'controlbox',
|
|
|
box_id: 'controlbox',
|
|
|
type: 'controlbox',
|
|
|
closed: !_converse.show_controlbox_by_default
|
|
|
- })
|
|
|
- ;
|
|
|
+ }, settings))
|
|
|
+ };
|
|
|
|
|
|
_converse.ControlBoxView = _converse.ChatBoxView.extend({
|
|
|
tagName: 'div',
|