瀏覽代碼

Remove `allow_muc` setting

JC Brand 3 年之前
父節點
當前提交
7b31f4d333
共有 4 個文件被更改,包括 8 次插入12 次删除
  1. 4 0
      CHANGES.md
  2. 0 7
      docs/source/configuration.rst
  3. 0 1
      src/headless/plugins/muc/index.js
  4. 4 4
      src/headless/plugins/muc/utils.js

+ 4 - 0
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

+ 0 - 7
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
 ---------------------

+ 0 - 1
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': [],

+ 4 - 4
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
     }