-
Notifications
You must be signed in to change notification settings - Fork 264
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
rtc: Handle non-MXID call member event state keys #3836
rtc: Handle non-MXID call member event state keys #3836
Conversation
Update Ruma dependency to expect call membership state events with state keys that are arbitrary strings, not just pure MXIDs. When a call membership state key does not exactly match the format of an MXID, treat it as a valid state key if it starts with an MXID followed by an underscore, with that MXID designating the owner of the event. (The state key may also be optionally prefixed with an underscore, which is permitted as a way to bypass pre-MSC3757 authorization rules against sending state events with state keys that do not exactly match the sender's MXID.)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3836 +/- ##
==========================================
+ Coverage 84.12% 84.13% +0.01%
==========================================
Files 263 263
Lines 27592 27605 +13
==========================================
+ Hits 23211 23225 +14
+ Misses 4381 4380 -1 ☔ View full report in Codecov by Sentry. |
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.
Thanks, looks sane but it'd be nice to have some basic unit tests (which would also show what behavior is expected and what isn't).
(Sorry @stefanceriu, I hadn't seen you removed my review request, and the PR is simple enough that I could take a look — feel free to re-take over if you prefer!) |
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 hadn't seen you removed my review request
Oh no worries, I only removed you because I can test it end to end, but it doesn't really matter.
It seems to work just fine on both call.element.io
and call.element.dev
so from my point of view you can merge it after adressing benji's concerns. Nicely done! 👍
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.
Getting closer, thanks for making a separate function and writing tests!
Co-authored-by: Benjamin Bouvier <[email protected]> Signed-off-by: Andrew Ferrazzutti <[email protected]>
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.
Looks good to me, modulo test nits, thanks! Please push another commit with the test changes, and then no need to ask for another review, I'll merge it 👍
I've addressed the nits for you actually, so we can merge :) |
Update Ruma dependency to expect call membership state events with state keys that are arbitrary strings, not just pure MXIDs.
When a call membership state key does not exactly match the format of an MXID, treat it as a valid state key if it starts with an MXID followed by an underscore, with that MXID designating the owner of the event.
(The state key may also be optionally prefixed with an underscore, which is permitted as a way to bypass pre-MSC3757 authorization rules against sending state events with state keys that do not exactly match the sender's MXID.)
Signed-off-by: Andrew Ferrazzutti [email protected]