diff options
author | Erik Johnston <erikj@element.io> | 2024-07-09 18:29:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 18:29:32 +0100 |
commit | 22fbc5be5482beaefc98a16c92f0e5b0dad84151 (patch) | |
tree | e5a70ecc952ba3b68018cae9df91db503c8581e2 | |
parent | Note the new federated media worker endpoints in the worker docs & upgrade no... (diff) | |
download | synapse-22fbc5be5482beaefc98a16c92f0e5b0dad84151.tar.xz |
Fix new media APIs when using synapse.app.media_repository (#17420)
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
-rw-r--r-- | changelog.d/17420.bugfix | 1 | ||||
-rw-r--r-- | synapse/federation/transport/server/__init__.py | 2 | ||||
-rw-r--r-- | synapse/rest/__init__.py | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/17420.bugfix b/changelog.d/17420.bugfix new file mode 100644 index 0000000000..343f9b9331 --- /dev/null +++ b/changelog.d/17420.bugfix @@ -0,0 +1 @@ +Fix bug where using `synapse.app.media_repository` worker configuration would break the new media endpoints. diff --git a/synapse/federation/transport/server/__init__.py b/synapse/federation/transport/server/__init__.py index 5f997040d0..72599bb204 100644 --- a/synapse/federation/transport/server/__init__.py +++ b/synapse/federation/transport/server/__init__.py @@ -321,7 +321,7 @@ def register_servlets( servletclass == FederationMediaDownloadServlet or servletclass == FederationMediaThumbnailServlet ): - if not hs.config.server.enable_media_repo: + if not hs.config.media.can_load_media_repo: continue servletclass( diff --git a/synapse/rest/__init__.py b/synapse/rest/__init__.py index c94d454a28..1aa9ea3877 100644 --- a/synapse/rest/__init__.py +++ b/synapse/rest/__init__.py @@ -145,7 +145,7 @@ class ClientRestResource(JsonResource): password_policy.register_servlets(hs, client_resource) knock.register_servlets(hs, client_resource) appservice_ping.register_servlets(hs, client_resource) - if hs.config.server.enable_media_repo: + if hs.config.media.can_load_media_repo: from synapse.rest.client import media media.register_servlets(hs, client_resource) |