-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support MSC3916 by adding unstable media endpoints to _matrix/client
#17213
Conversation
@@ -0,0 +1,1625 @@ | |||
# | |||
# This file is licensed under the Affero General Public License (AGPL) version 3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this is tests that are copies of the extant tests for media endpoints, with the url changed to the new unstable url (I did add one for the /config
endpoint since there wasn't one), with the idea that the old tests testing the old urls would be removed when those endpoints are deprecated, and made sure these tests are under the correct hierarchy.
@@ -46,11 +46,11 @@ | |||
from synapse.media.filepath import MediaFilePaths | |||
from synapse.media.media_storage import MediaStorage, ReadableFileWrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these tests won't be moved when the old endpoints are deprecated I changed the urls in these tests to test the new URLs, I was thinking that we could drop these changes before merge as it is mostly just a proof that the new endpoints work the same as the old endpoints - or would it make sense to copy these tests and have a set for the new URLs and the old URLs (which I did below)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use @parameterized_class
to run the tests twice with different URLs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh that makes sense thanks! It's been fixed
e74b2a4
to
4307c4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good, c.f. note about tests
Thanks for the approval! I think you might need to hit merge for me though, I no longer posses that power :) |
element-hq#17213) [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/blob/rav/authentication-for-media/proposals/3916-authentication-for-media.md) adds new media endpoints under `_matrix/client`. This PR adds the `/preview_url`, `/config`, and `/thumbnail` endpoints. `/download` will be added in a follow-up PR once the work for the federation `/download` endpoint is complete (see element-hq#17172). Should be reviewable commit-by-commit.
MSC3916 adds new media endpoints under
_matrix/client
. This PR adds the/preview_url
,/config
, and/thumbnail
endpoints./download
will be added in a follow-up PR once the work for the federation/download
endpoint is complete (see #17172).Should be reviewable commit-by-commit.