diff options
author | Shay <hillerys@element.io> | 2024-06-25 07:35:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-25 14:35:37 +0000 |
commit | a023538822c8e241cdd3180c9cbbcb0f4eb84844 (patch) | |
tree | a683081ca5898833895ec4cc70a4f0959a48df06 /synapse/federation/transport/server/_base.py | |
parent | Fix refreshable_access_token_lifetime typo (#17357) (diff) | |
download | synapse-a023538822c8e241cdd3180c9cbbcb0f4eb84844.tar.xz |
Re-introduce federation /download endpoint (#17350)
Diffstat (limited to 'synapse/federation/transport/server/_base.py')
-rw-r--r-- | synapse/federation/transport/server/_base.py | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/synapse/federation/transport/server/_base.py b/synapse/federation/transport/server/_base.py index db0f5076a9..4e2717b565 100644 --- a/synapse/federation/transport/server/_base.py +++ b/synapse/federation/transport/server/_base.py @@ -360,13 +360,29 @@ class BaseFederationServlet: "request" ) return None + if ( + func.__self__.__class__.__name__ # type: ignore + == "FederationUnstableMediaDownloadServlet" + ): + response = await func( + origin, content, request, *args, **kwargs + ) + else: + response = await func( + origin, content, request.args, *args, **kwargs + ) + else: + if ( + func.__self__.__class__.__name__ # type: ignore + == "FederationUnstableMediaDownloadServlet" + ): + response = await func( + origin, content, request, *args, **kwargs + ) + else: response = await func( origin, content, request.args, *args, **kwargs ) - else: - response = await func( - origin, content, request.args, *args, **kwargs - ) finally: # if we used the origin's context as the parent, add a new span using # the servlet span as a parent, so that we have a link |