From 7b31f4d333648af87281f24d85ac37fbf549074b Mon Sep 17 00:00:00 2001 From: JC Brand Date: Sat, 9 Apr 2022 08:28:28 +0200 Subject: [PATCH] Remove `allow_muc` setting --- CHANGES.md | 4 ++++ docs/source/configuration.rst | 7 ------- src/headless/plugins/muc/index.js | 1 - src/headless/plugins/muc/utils.js | 8 ++++---- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d3506478a..90336c8d8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,10 @@ - #2746: Always reply to all iqs, even those not understood - #2868: Selected emoji is inserted into all open chat boxes +Remove the very old and largely unused config option `allow_muc`. +If you don't want MUC support, you can add `'converse-muc'` to the +`blacklisted_plugins` setting. + ## 9.1.0 (2022-04-02) - Updated translations: af, ar, es, eu, fr, gl, he, lt diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst index c455e08b3..551539467 100644 --- a/docs/source/configuration.rst +++ b/docs/source/configuration.rst @@ -224,13 +224,6 @@ allow_message_styling Determines wehether support for XEP-0393 Message Styling hints are enabled or not. -allow_muc ---------- - -* Default: ``true`` - -Allow multi-user chat (muc) in chatrooms. Setting this to ``false`` will remove -the ``Chatrooms`` tab from the control box. allow_muc_invitations --------------------- diff --git a/src/headless/plugins/muc/index.js b/src/headless/plugins/muc/index.js index d98bf1804..8242e1aed 100644 --- a/src/headless/plugins/muc/index.js +++ b/src/headless/plugins/muc/index.js @@ -159,7 +159,6 @@ converse.plugins.add('converse-muc', { // Refer to docs/source/configuration.rst for explanations of these // configuration settings. api.settings.extend({ - 'allow_muc': true, 'allow_muc_invitations': true, 'auto_join_on_invite': false, 'auto_join_rooms': [], diff --git a/src/headless/plugins/muc/utils.js b/src/headless/plugins/muc/utils.js index b98065467..67b1cc091 100644 --- a/src/headless/plugins/muc/utils.js +++ b/src/headless/plugins/muc/utils.js @@ -148,7 +148,8 @@ export function isInfoVisible (code) { } -/* Automatically join groupchats, based on the +/** + * Automatically join groupchats, based on the * "auto_join_rooms" configuration setting, which is an array * of strings (groupchat JIDs) or objects (with groupchat JID and other settings). */ @@ -180,9 +181,8 @@ export async function autoJoinRooms () { export function onAddClientFeatures () { - if (api.settings.get('allow_muc')) { - api.disco.own.features.add(Strophe.NS.MUC); - } + api.disco.own.features.add(Strophe.NS.MUC); + if (api.settings.get('allow_muc_invitations')) { api.disco.own.features.add('jabber:x:conference'); // Invites }