Parcourir la source

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.
JC Brand il y a 5 ans
Parent
commit
a9128808de
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/converse-muc-views.js

+ 2 - 2
src/converse-muc-views.js

@@ -720,8 +720,7 @@ converse.plugins.add('converse-muc-views', {
                 const container = this.el.querySelector('.bottom-panel');
                 const entered = this.model.get('connection_status') === converse.ROOMSTATUS.ENTERED;
                 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, nickname});
+                container.innerHTML = tpl_chatroom_bottom_panel({__, can_edit, entered});
                 if (entered && can_edit) {
                     this.renderMessageForm();
                     this.initMentionAutoComplete();
@@ -1060,6 +1059,7 @@ converse.plugins.add('converse-muc-views', {
                 } else if (conn_status === converse.ROOMSTATUS.CONNECTING) {
                     this.showSpinner();
                 } else if (conn_status === converse.ROOMSTATUS.ENTERED) {
+                    this.renderBottomPanel();
                     this.hideSpinner();
                     if (_converse.auto_focus) {
                         this.focus();