summary refs log tree commit diff
path: root/synapse/app/generic_worker.py
diff options
context:
space:
mode:
authorEric Eastwood <eric.eastwood@beta.gouv.fr>2024-08-08 12:58:58 -0500
committerEric Eastwood <eric.eastwood@beta.gouv.fr>2024-08-08 12:58:58 -0500
commit7507371b5b67ae96adf97b41c24e430b6bee3fcd (patch)
tree4668a645885122685c6e80354ea2fba1ebfe6a36 /synapse/app/generic_worker.py
parentRemove duplicate filtering (diff)
parentStart handlers for new media endpoints when media resource configured (#17483) (diff)
downloadsynapse-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/generic_worker.py')
-rw-r--r--synapse/app/generic_worker.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py

index 248622fa92..53f1859256 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py
@@ -206,6 +206,21 @@ class GenericWorkerServer(HomeServer): "/_synapse/admin": admin_resource, } ) + + if "federation" not in res.names: + # Only load the federation media resource separately if federation + # resource is not specified since federation resource includes media + # resource. + resources[FEDERATION_PREFIX] = TransportLayerServer( + self, servlet_groups=["media"] + ) + if "client" not in res.names: + # Only load the client media resource separately if client + # resource is not specified since client resource includes media + # resource. + resources[CLIENT_API_PREFIX] = ClientRestResource( + self, servlet_groups=["media"] + ) else: logger.warning( "A 'media' listener is configured but the media"