From dbd7eff234cda5f31d8467a701dd2b6707eed9cb Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 9 Jul 2024 15:25:40 +0100 Subject: [PATCH 1/3] Fix new media APIs when using synapse.app.media_repository --- synapse/federation/transport/server/__init__.py | 2 +- synapse/rest/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/federation/transport/server/__init__.py b/synapse/federation/transport/server/__init__.py index 5f997040d0b..72599bb2049 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 c94d454a287..1aa9ea3877a 100644 --- a/synapse/rest/__init__.py +++ b/synapse/rest/__init__.py @@ -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) From 02c7486278448c8edaa52e4e708ab2620542b659 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 9 Jul 2024 15:26:30 +0100 Subject: [PATCH 2/3] Newsfile --- changelog.d/17420.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/17420.bugfix diff --git a/changelog.d/17420.bugfix b/changelog.d/17420.bugfix new file mode 100644 index 00000000000..c8667393aa2 --- /dev/null +++ b/changelog.d/17420.bugfix @@ -0,0 +1 @@ +Fix bug where using `synapse.app.media_repository` configuration would break the new media endpoints. From 02457f8652f7c8039b16c6ec603702685fb6c0c3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 9 Jul 2024 15:30:38 +0100 Subject: [PATCH 3/3] Update changelog.d/17420.bugfix Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- changelog.d/17420.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/17420.bugfix b/changelog.d/17420.bugfix index c8667393aa2..343f9b9331c 100644 --- a/changelog.d/17420.bugfix +++ b/changelog.d/17420.bugfix @@ -1 +1 @@ -Fix bug where using `synapse.app.media_repository` configuration would break the new media endpoints. +Fix bug where using `synapse.app.media_repository` worker configuration would break the new media endpoints.