Skip to content
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

Use the new authenticated endpoints in MediaProxy #506

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

tadzik
Copy link
Contributor

@tadzik tadzik commented Sep 5, 2024

Fixes the requests failing in matrix-org/matrix-appservice-irc#1816

@tadzik tadzik requested a review from a team as a code owner September 5, 2024 09:06
@@ -147,7 +147,12 @@ export class MediaProxy {
}
// Cache from this point onwards.
// Extract the media from the event.
const url = this.matrixClient.mxcToHttp('mxc://' + metadata.mxc);
const mxcMatch = metadata.mxc.match(new RegExp('^([^/]+)/(.+)$'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assume we have tests that cover this :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual ones, I'm afraid – our tests never get deep enough to hit onMediaRequest.

I can pull this out into a module and test it there.

@tadzik tadzik force-pushed the tadzik/use-authenticated-endpoints-in-mediaproxy branch from b2ce852 to afdfd30 Compare September 5, 2024 10:37
@tadzik tadzik merged commit 69d531b into develop Sep 5, 2024
14 checks passed
@tadzik tadzik deleted the tadzik/use-authenticated-endpoints-in-mediaproxy branch September 5, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants