Commit f1e1e538 authored by JC Brand's avatar JC Brand

muc-views: Wait for messages to be fetched

Also, insert occupants sidebar before inserting the chat into the DOM
parent 099603ed
...@@ -652,7 +652,7 @@ converse.plugins.add('converse-muc-views', { ...@@ -652,7 +652,7 @@ converse.plugins.add('converse-muc-views', {
'submit .muc-nickname-form': 'submitNickname' 'submit .muc-nickname-form': 'submitNickname'
}, },
initialize () { async initialize () {
this.initDebounced(); this.initDebounced();
this.listenTo(this.model.messages, 'add', this.onMessageAdded); this.listenTo(this.model.messages, 'add', this.onMessageAdded);
...@@ -679,8 +679,8 @@ converse.plugins.add('converse-muc-views', { ...@@ -679,8 +679,8 @@ converse.plugins.add('converse-muc-views', {
this.listenTo(this.model.occupants, 'change:affiliation', this.onOccupantAffiliationChanged); this.listenTo(this.model.occupants, 'change:affiliation', this.onOccupantAffiliationChanged);
this.render(); this.render();
this.updateAfterMessagesFetched();
this.createOccupantsView(); this.createOccupantsView();
await this.updateAfterMessagesFetched();
this.onConnectionStatusChanged(); this.onConnectionStatusChanged();
/** /**
* Triggered once a groupchat has been opened * Triggered once a groupchat has been opened
......
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