summary refs log tree commit diff
path: root/synapse/config/server.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2022-03-30 11:43:04 +0200
committerGitHub <noreply@github.com>2022-03-30 09:43:04 +0000
commit437a8ed9efdf8f1aefa092d0761076da3ae78100 (patch)
tree6ed4fb059a2d4029f244b982b508ebb0a02385e4 /synapse/config/server.py
parentFix typechecker problems exposed by signedjson 1.1.2 (#12326) (diff)
downloadsynapse-437a8ed9efdf8f1aefa092d0761076da3ae78100.tar.xz
Add a configuration to exclude rooms from sync response (#12310)
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r--synapse/config/server.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 38de4b8000..0f90302c95 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -680,6 +680,10 @@ class ServerConfig(Config):
             config.get("use_account_validity_in_account_status") or False
         )
 
+        self.rooms_to_exclude_from_sync: List[str] = (
+            config.get("exclude_rooms_from_sync") or []
+        )
+
     def has_tls_listener(self) -> bool:
         return any(listener.tls for listener in self.listeners)
 
@@ -1234,6 +1238,15 @@ class ServerConfig(Config):
           # information about using custom templates.
           #
           #custom_template_directory: /path/to/custom/templates/
+
+        # List of rooms to exclude from sync responses. This is useful for server
+        # administrators wishing to group users into a room without these users being able
+        # to see it from their client.
+        #
+        # By default, no room is excluded.
+        #
+        #exclude_rooms_from_sync:
+        #    - !foo:example.com
         """
             % locals()
         )