mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 07:25:05 -04:00
Add custom well-known (#13035)
Co-authored-by: David Robertson <david.m.robertson1@gmail.com>
This commit is contained in:
parent
ffe2464836
commit
0ef1307619
5 changed files with 68 additions and 1 deletions
|
@ -301,6 +301,26 @@ class ServerConfig(Config):
|
|||
"public_baseurl cannot contain query parameters or a #-fragment"
|
||||
)
|
||||
|
||||
self.extra_well_known_client_content = config.get(
|
||||
"extra_well_known_client_content", {}
|
||||
)
|
||||
|
||||
if not isinstance(self.extra_well_known_client_content, dict):
|
||||
raise ConfigError(
|
||||
"extra_well_known_content must be a dictionary of key-value pairs"
|
||||
)
|
||||
|
||||
if "m.homeserver" in self.extra_well_known_client_content:
|
||||
raise ConfigError(
|
||||
"m.homeserver is not supported in extra_well_known_content, "
|
||||
"use public_baseurl in base config instead."
|
||||
)
|
||||
if "m.identity_server" in self.extra_well_known_client_content:
|
||||
raise ConfigError(
|
||||
"m.identity_server is not supported in extra_well_known_content, "
|
||||
"use default_identity_server in base config instead."
|
||||
)
|
||||
|
||||
# Whether to enable user presence.
|
||||
presence_config = config.get("presence") or {}
|
||||
self.use_presence = presence_config.get("enabled")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue