summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2023-01-28 16:40:48 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2023-01-28 16:40:48 +0100
commitc601f796fc74a60fb446424c7f29c6d96f16dc25 (patch)
tree14851d54f3dfea53cf89c22ff5d6d843ba519d9b
parentAdd experimental config option for MSC3480 (diff)
downloadsynapse-c601f796fc74a60fb446424c7f29c6d96f16dc25.tar.xz
Don't send device names over federation if msc3480 is enabled
Diffstat (limited to '')
-rw-r--r--synapse/config/experimental.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/config/experimental.py b/synapse/config/experimental.py
index 4d49dc4693..aeaa708c50 100644
--- a/synapse/config/experimental.py
+++ b/synapse/config/experimental.py
@@ -168,6 +168,15 @@ class ExperimentalConfig(Config):
 
         # MSC3480: Make device names private.
         self.msc3480_enabled = experimental.get("msc3480_enabled", False)
+        if (
+            self.msc3480_enabled
+            and config.get("allow_device_name_lookup_over_federation") is not False
+        ):
+            raise ConfigError(
+                "Option 'allow_device_name_lookup_over_federation' must be "
+                "'false' if experimental MSC3480 support is enabled (option "
+                "'experimental_features.msc3480_enabled' is 'true')"
+            )
 
         # MSC3925: do not replace events with their edits
         self.msc3925_inhibit_edit = experimental.get("msc3925_inhibit_edit", False)