mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-13 04:53:16 +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:
parent
62d8b0361b
commit
22fbc5be54
3 changed files with 3 additions and 2 deletions
1
changelog.d/17420.bugfix
Normal file
1
changelog.d/17420.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix bug where using `synapse.app.media_repository` worker configuration would break the new media endpoints.
|
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue