Commit 94bea16c authored by JC Brand's avatar JC Brand

Remove `chatBoxOpened` event

parent d1572f35
......@@ -406,7 +406,7 @@
await test_utils.waitUntil(() => _converse.chatboxes.length == 7)
expect(_converse.chatboxviews.trimChats).toHaveBeenCalled();
expect(_converse.chatboxes.length).toEqual(7);
expect(_converse.api.trigger).toHaveBeenCalledWith('chatBoxOpened', jasmine.any(Object));
expect(_converse.api.trigger).toHaveBeenCalledWith('chatBoxInitialized', jasmine.any(Object));
test_utils.closeAllChatBoxes(_converse);
expect(_converse.chatboxes.length).toEqual(1);
......
......@@ -935,7 +935,7 @@
'id': (new Date()).getTime()
}).c('body').t('😇').up()
.c('active', {'xmlns': 'http://jabber.org/protocol/chatstates'}).tree());
await new Promise(resolve => _converse.on('chatBoxOpened', resolve));
await new Promise(resolve => _converse.on('chatBoxInitialized', resolve));
const view = _converse.api.chatviews.get(sender_jid);
await new Promise((resolve, reject) => view.once('messageInserted', resolve));
......@@ -1084,7 +1084,7 @@
'id': (new Date()).getTime()
}).c('body').t('A message').up()
.c('active', {'xmlns': 'http://jabber.org/protocol/chatstates'}).tree());
await new Promise(resolve => _converse.on('chatBoxOpened', resolve));
await new Promise(resolve => _converse.on('chatBoxInitialized', resolve));
const view = _converse.api.chatviews.get(sender_jid);
await new Promise((resolve, reject) => view.once('messageInserted', resolve));
......
......@@ -349,7 +349,6 @@ converse.plugins.add('converse-chatview', {
this.render();
this.fetchMessages();
_converse.api.trigger('chatBoxOpened', this); // TODO: remove
/**
* Triggered once the _converse.ChatBoxView has been initialized
* @event _converse#chatBoxInitialized
......
......@@ -89,7 +89,6 @@ converse.plugins.add('converse-headline', {
this.model.on('change:minimized', this.onMinimizedChanged, this);
this.render().insertHeading().fetchMessages().insertIntoDOM().hide();
_converse.api.trigger('chatBoxOpened', this); // TODO: remove
_converse.api.trigger('chatBoxInitialized', this);
},
......
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