Skip to content

Commit

Permalink
Fix new media APIs when using synapse.app.media_repository (#17420)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Morgan <[email protected]>
  • Loading branch information
erikjohnston and anoadragon453 authored Jul 9, 2024
1 parent 62d8b03 commit 22fbc5b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/17420.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug where using `synapse.app.media_repository` worker configuration would break the new media endpoints.
2 changes: 1 addition & 1 deletion synapse/federation/transport/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def register_servlets(client_resource: HttpServer, hs: "HomeServer") -> None:
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)
Expand Down

0 comments on commit 22fbc5b

Please sign in to comment.