Don't send device names over federation if msc3480 is enabled

This commit is contained in:
Andrew Morgan 2023-01-28 16:40:48 +01:00
parent f4d0c6a364
commit c601f796fc

View file

@ -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)