Commit a9128808 authored by JC Brand's avatar JC Brand

muc: Re-render the bottom panel once we enter the MUC

Otherwise we end up with no textarea when rendering a MUC that starts
with connection_status of entered but which then needs to reconnnect.
parent 53ced8c7
...@@ -720,8 +720,7 @@ converse.plugins.add('converse-muc-views', { ...@@ -720,8 +720,7 @@ converse.plugins.add('converse-muc-views', {
const container = this.el.querySelector('.bottom-panel'); const container = this.el.querySelector('.bottom-panel');
const entered = this.model.get('connection_status') === converse.ROOMSTATUS.ENTERED; const entered = this.model.get('connection_status') === converse.ROOMSTATUS.ENTERED;
const can_edit = entered && !(this.model.features.get('moderated') && this.model.getOwnRole() === 'visitor'); const can_edit = entered && !(this.model.features.get('moderated') && this.model.getOwnRole() === 'visitor');
const nickname = this.model.get('nickname'); container.innerHTML = tpl_chatroom_bottom_panel({__, can_edit, entered});
container.innerHTML = tpl_chatroom_bottom_panel({__, can_edit, entered, nickname});
if (entered && can_edit) { if (entered && can_edit) {
this.renderMessageForm(); this.renderMessageForm();
this.initMentionAutoComplete(); this.initMentionAutoComplete();
...@@ -1060,6 +1059,7 @@ converse.plugins.add('converse-muc-views', { ...@@ -1060,6 +1059,7 @@ converse.plugins.add('converse-muc-views', {
} else if (conn_status === converse.ROOMSTATUS.CONNECTING) { } else if (conn_status === converse.ROOMSTATUS.CONNECTING) {
this.showSpinner(); this.showSpinner();
} else if (conn_status === converse.ROOMSTATUS.ENTERED) { } else if (conn_status === converse.ROOMSTATUS.ENTERED) {
this.renderBottomPanel();
this.hideSpinner(); this.hideSpinner();
if (_converse.auto_focus) { if (_converse.auto_focus) {
this.focus(); this.focus();
......
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