-
Notifications
You must be signed in to change notification settings - Fork 150
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
Integrate MediaProxy to bridge authenticated Matrix media (MSC3916) #1805
Conversation
c942794
to
8a4eedd
Compare
8a4eedd
to
25990cf
Compare
just to confirm: does this mean to say MSC3916 instead of MSC3910? 3910 is a closed, but related, MSC. |
Yes, correct - I copied the old number from the MAB PR :) |
Is a release with this planned before Synapse defaults to disallowing unauthenticated media? |
Yes, that's the plan. |
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.
This looks good on the whole, only a few suggestions. Should we have tests though?
@@ -13,7 +13,6 @@ export interface BridgeConfig { | |||
}; | |||
homeserver: { | |||
url: string; | |||
media_url?: string; |
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.
It would be kind somewhere to fail to start if this is still configured?
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'd keep it optional (maybe with a warning?) to make sure you can rollback easily without changing the configs too much.
We do require mediaProxy
being configured now, so users will surely notice the change.
oldConfig.homeserver.media_url = newConfig.homeserver.media_url; | ||
log.info(`Adjusted media_url to ${newConfig.homeserver.media_url}`); | ||
if (JSON.stringify(oldConfig.ircService.mediaProxy) !== JSON.stringify(newConfig.ircService.mediaProxy)) { | ||
await this._mediaProxy?.close(); |
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.
Very nice!
We have some tests covering the case of "do these URLs look like MediaProxy's URLs" – I'm not sure how much further we want to take this, if it all. |
I think that's sufficient, upstream has tests that the MP works? |
This reduces the chance of conflict with other processes, and also stops one non-clean shutdown from blowing up the rest of the test suite.
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 see no problems here. I have one concern about the test reporter :)
Depends on matrix-org/matrix-appservice-bridge#444