-
Notifications
You must be signed in to change notification settings - Fork 100
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
Authenticate media requests when loading avatars #2856
Conversation
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.
What is the intended behaviour when EC is running as a widget?
😢 , I suspect. There isn't an API presently to fetch media over the widget API and we don't have a token to use that could do it. I wish for a world where we get scoped OIDC tokens and can just use the actual API. matrix-org/matrix-widget-api#115 would be useful. I think for the moment we could either still support unauthenticated media for widgets while new avatars slowly replace the old ones and we lose access to them. Or we could just show placeholders for all avatars until we can properly support authenticated media. |
If the PR can be updated to make it work with the widget mode fallback (with appropriate tests too), then I think we could merge this PR without having to figure out the whole widget API solution. |
@fkwp as this is currently proposed user profile thumbnails will no longer show when running in widget/embedded mode. Is this acceptable? or should EC be continuing to use non-authenticated media requests when running as a widget? Marking as draft with X-Needs-Product label until answered. |
So I believe we were okay to merge this now, and then fix the thumbnail in widgets later as we didn't deem it critical enough. I was going to look at expanding the widget API to do so as a next-up item. |
👌 I made #2876 to add the feature back in. |
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.
One typo. Otherwise looks good. 👍
Co-authored-by: Hugh Nimmo-Smith <[email protected]>
Will this merge be in a release soon? |
There is currently a release blocker which is now being tracked at #2972 |
Thank you! |
Fixes #2845
This introduces support for authenticated matrix media for avatars. All media requests are now made via
fetch
and then the result is stored as a local object url.