0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 00:13:45 +01:00

Fix new media APIs when using synapse.app.media_repository (#17420)

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
This commit is contained in:
Erik Johnston 2024-07-09 18:29:32 +01:00 committed by GitHub
parent 62d8b0361b
commit 22fbc5be54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

1
changelog.d/17420.bugfix Normal file
View file

@ -0,0 +1 @@
Fix bug where using `synapse.app.media_repository` worker configuration would break the new media endpoints.

View file

@ -321,7 +321,7 @@ def register_servlets(
servletclass == FederationMediaDownloadServlet servletclass == FederationMediaDownloadServlet
or servletclass == FederationMediaThumbnailServlet or servletclass == FederationMediaThumbnailServlet
): ):
if not hs.config.server.enable_media_repo: if not hs.config.media.can_load_media_repo:
continue continue
servletclass( servletclass(

View file

@ -145,7 +145,7 @@ class ClientRestResource(JsonResource):
password_policy.register_servlets(hs, client_resource) password_policy.register_servlets(hs, client_resource)
knock.register_servlets(hs, client_resource) knock.register_servlets(hs, client_resource)
appservice_ping.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 from synapse.rest.client import media
media.register_servlets(hs, client_resource) media.register_servlets(hs, client_resource)