diff options
author | Eric Eastwood <eric.eastwood@beta.gouv.fr> | 2024-08-08 12:58:58 -0500 |
---|---|---|
committer | Eric Eastwood <eric.eastwood@beta.gouv.fr> | 2024-08-08 12:58:58 -0500 |
commit | 7507371b5b67ae96adf97b41c24e430b6bee3fcd (patch) | |
tree | 4668a645885122685c6e80354ea2fba1ebfe6a36 /synapse/app/homeserver.py | |
parent | Remove duplicate filtering (diff) | |
parent | Start handlers for new media endpoints when media resource configured (#17483) (diff) | |
download | synapse-madlittlemods/sliding-sync-must-await-full-state.tar.xz |
Merge branch 'develop' into madlittlemods/sliding-sync-must-await-full-state github/madlittlemods/sliding-sync-must-await-full-state madlittlemods/sliding-sync-must-await-full-state
Diffstat (limited to 'synapse/app/homeserver.py')
-rw-r--r-- | synapse/app/homeserver.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index e114ab7ec4..2a824e8457 100644 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -101,6 +101,12 @@ class SynapseHomeServer(HomeServer): # Skip loading openid resource if federation is defined # since federation resource will include openid continue + if name == "media" and ( + "federation" in res.names or "client" in res.names + ): + # Skip loading media resource if federation or client are defined + # since federation & client resources will include media + continue if name == "health": # Skip loading, health resource is always included continue @@ -231,6 +237,14 @@ class SynapseHomeServer(HomeServer): "'media' resource conflicts with enable_media_repo=False" ) + if name == "media": + resources[FEDERATION_PREFIX] = TransportLayerServer( + self, servlet_groups=["media"] + ) + resources[CLIENT_API_PREFIX] = ClientRestResource( + self, servlet_groups=["media"] + ) + if name in ["keys", "federation"]: resources[SERVER_KEY_PREFIX] = KeyResource(self) |