Parcourir la source

Updates #1554

Room auto-configuration broke if the config form contained fields with type `fixed`
JC Brand il y a 6 ans
Parent
commit
8bb852b139
4 fichiers modifiés avec 14 ajouts et 0 suppressions
  1. 1 0
      CHANGES.md
  2. 5 0
      dist/converse.js
  3. 3 0
      src/headless/converse-muc.js
  4. 5 0
      src/headless/dist/converse-headless.js

+ 1 - 0
CHANGES.md

@@ -13,6 +13,7 @@
 - #1296: `embedded` view mode shows `chatbox-navback` arrow in header
 - #1532: Converse reloads on enter pressed in the filter box
 - #1550: Legitimate carbons being blocked due to erroneous forgery check
+- #1554: Room auto-configuration broke if the config form contained fields with type `fixed`
 
 - **Breaking changes**:
 - Rename `muc_disable_moderator_commands` to [muc_disable_slash_commands](https://conversejs.org/docs/html/configuration.html#muc-disable-slash-commands).

+ 5 - 0
dist/converse.js

@@ -67523,6 +67523,11 @@ _converse_core__WEBPACK_IMPORTED_MODULE_3__["default"].plugins.add('converse-muc
        */
       addFieldValue(field) {
         const type = field.getAttribute('type');
+
+        if (type === 'fixed') {
+          return field;
+        }
+
         const fieldname = field.getAttribute('var').replace('muc#roomconfig_', '');
         const config = this.get('roomconfig');
 

+ 3 - 0
src/headless/converse-muc.js

@@ -653,6 +653,9 @@ converse.plugins.add('converse-muc', {
              */
             addFieldValue (field) {
                 const type = field.getAttribute('type');
+                if (type === 'fixed') {
+                    return field;
+                }
                 const fieldname = field.getAttribute('var').replace('muc#roomconfig_', '');
                 const config = this.get('roomconfig');
                 if (fieldname in config) {

+ 5 - 0
src/headless/dist/converse-headless.js

@@ -45771,6 +45771,11 @@ _converse_core__WEBPACK_IMPORTED_MODULE_3__["default"].plugins.add('converse-muc
        */
       addFieldValue(field) {
         const type = field.getAttribute('type');
+
+        if (type === 'fixed') {
+          return field;
+        }
+
         const fieldname = field.getAttribute('var').replace('muc#roomconfig_', '');
         const config = this.get('roomconfig');