|
@@ -100,6 +100,7 @@ converse.plugins.add('converse-muc-views', {
|
|
|
_converse.api.settings.update({
|
|
|
'auto_list_rooms': false,
|
|
|
'muc_disable_moderator_commands': false,
|
|
|
+ 'roomconfig_whitelist': [],
|
|
|
'visible_toolbar_buttons': {
|
|
|
'toggle_occupants': true
|
|
|
}
|
|
@@ -1115,7 +1116,12 @@ converse.plugins.add('converse-muc-views', {
|
|
|
if (instructions && instructions !== title) {
|
|
|
fieldset_el.insertAdjacentHTML('beforeend', `<p class="form-help">${instructions}</p>`);
|
|
|
}
|
|
|
- _.each(fields, field => fieldset_el.insertAdjacentHTML('beforeend', u.xForm2webForm(field, stanza)));
|
|
|
+ _.each(fields, field => {
|
|
|
+ if (_converse.roomconfig_whitelist.length === 0 ||
|
|
|
+ _.includes(_converse.roomconfig_whitelist, field.getAttribute('var'))) {
|
|
|
+ fieldset_el.insertAdjacentHTML('beforeend', u.xForm2webForm(field, stanza));
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
// Render save/cancel buttons
|
|
|
const last_fieldset_el = document.createElement('fieldset');
|