summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2019-03-21 10:16:54 +0000
committerGitHub <noreply@github.com>2019-03-21 10:16:54 +0000
commit09f991a63d08fb9dc22cd64b82e251fa6fe1b7ca (patch)
tree70d4b3933adcf129a1fc90e686955468489ebfa9 /synapse/config
parentLog requests which are simulated by the unit tests. (#4905) (diff)
parentAdd test (diff)
downloadsynapse-09f991a63d08fb9dc22cd64b82e251fa6fe1b7ca.tar.xz
Merge pull request #4896 from matrix-org/erikj/disable_room_directory
Add option to disable search room lists
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/room_directory.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/config/room_directory.py b/synapse/config/room_directory.py
index 9b897abe3c..8a9fded4c5 100644
--- a/synapse/config/room_directory.py
+++ b/synapse/config/room_directory.py
@@ -20,6 +20,10 @@ from ._base import Config, ConfigError
 
 class RoomDirectoryConfig(Config):
     def read_config(self, config):
+        self.enable_room_list_search = config.get(
+            "enable_room_list_search", True,
+        )
+
         alias_creation_rules = config.get("alias_creation_rules")
 
         if alias_creation_rules is not None:
@@ -54,6 +58,12 @@ class RoomDirectoryConfig(Config):
 
     def default_config(self, config_dir_path, server_name, **kwargs):
         return """
+        # Uncomment to disable searching the public room list. When disabled
+        # blocks searching local and remote room lists for local and remote
+        # users by always returning an empty list for all queries.
+        #
+        #enable_room_list_search: false
+
         # The `alias_creation` option controls who's allowed to create aliases
         # on this server.
         #