diff options
author | Shay <hillerys@element.io> | 2024-07-08 02:11:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-08 10:11:20 +0100 |
commit | cf69f8d59b0a1fad2b0f313281647e3ea527cf5e (patch) | |
tree | 6542c9ad652b88d6653cf720cbbf9e3711942bdb /synapse/federation/transport/server/_base.py | |
parent | Bump ruff from 0.3.7 to 0.5.0 (#17381) (diff) | |
download | synapse-cf69f8d59b0a1fad2b0f313281647e3ea527cf5e.tar.xz |
Support MSC3916 by adding a federation /thumbnail endpoint and authenticated `_matrix/client/v1/media/thumbnail` endpoint (#17388)
[MSC3916](https://github.com/matrix-org/matrix-spec-proposals/pull/3916) added the endpoints `_matrix/federation/v1/media/thumbnail` and the authenticated `_matrix/client/v1/media/thumbnail`. This PR implements those endpoints, along with stabilizing `_matrix/client/v1/media/config` and `_matrix/client/v1/media/preview_url`. Complement tests are at https://github.com/matrix-org/complement/pull/728
Diffstat (limited to 'synapse/federation/transport/server/_base.py')
-rw-r--r-- | synapse/federation/transport/server/_base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/federation/transport/server/_base.py b/synapse/federation/transport/server/_base.py index e124481474..9094201da0 100644 --- a/synapse/federation/transport/server/_base.py +++ b/synapse/federation/transport/server/_base.py @@ -363,6 +363,8 @@ class BaseFederationServlet: if ( func.__self__.__class__.__name__ # type: ignore == "FederationMediaDownloadServlet" + or func.__self__.__class__.__name__ # type: ignore + == "FederationMediaThumbnailServlet" ): response = await func( origin, content, request, *args, **kwargs @@ -375,6 +377,8 @@ class BaseFederationServlet: if ( func.__self__.__class__.__name__ # type: ignore == "FederationMediaDownloadServlet" + or func.__self__.__class__.__name__ # type: ignore + == "FederationMediaThumbnailServlet" ): response = await func( origin, content, request, *args, **kwargs |