-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Remove support for "legacy" MSC3898 group calling in MatrixRTCSession and CallMembership #4583
Remove support for "legacy" MSC3898 group calling in MatrixRTCSession and CallMembership #4583
Conversation
3c04d2b
to
bcef1d3
Compare
042862b
to
4418747
Compare
We actually had a bit of tests just for legacy and not for session events. All those tests got ported over so we do not remove any tests.
b900f7a
to
c0e5909
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.
This is quite a sizeable PR and not a very obvious change either. I might need some help understanding what's going on here.
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'm finding it hard to reason about changes to the tests because the legacy behaviour is removed vs cleaning up the tests.
@toger5 would it be a lot of work to split this into two PRs? one with just the legacy removals and the other refactoring the test cases?
c0e5909
to
05915fb
Compare
dd8726e
to
795a3cf
Compare
it is fine to move it into a seperate PR: #4587 It will be very tedious to maintain the two branches. So as soon as we notice this needs more changes I propose just closing this PR and using it to make reviewing easier and merge the other (4587) branch. |
795a3cf
to
e8588e8
Compare
d4e1f51
to
2cd6f96
Compare
@dbkr We made this an "almost" exclusively remove code PR. |
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.
From a VoIP team point of view this looks great. 👍
I defer to web team folk for final review.
Co-authored-by: Hugh Nimmo-Smith <[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 generally sensible now, thanks for slimming this down.
src/matrixrtc/CallMembership.ts
Outdated
// Assume that local clock is sufficiently in sync with other clocks in the distributed system. | ||
// We used to try and adjust for the local clock being skewed, but there are cases where this is not accurate. | ||
// The current implementation allows for the local clock to be -infinity to +MatrixRTCSession.MEMBERSHIP_EXPIRY_TIME/2 | ||
return this.getAbsoluteExpiry() - Date.now(); |
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 looks like the impl of this is taking the legacy bit from above? I would expect it to be the other way around, although that bit just returns 'undefined'...
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.
Two things have got conflated in this PR:
- Removing the legacy logic
- Implementing an expiry logic for the non-legacy code
I've removed the latter from this PR to make the review easier. It should go in another PR. What I have done is left some TODOs and commented out code in to help with this. If you would prefer that they are removed outright then we can do so.
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.
Gotcha, thanks. I think it was simple enough this would have been okay, it just wasn't obvious what was going on from reading through. Thanks though.
MSC3898 has been superseded by MSC4143.
This PR removes support for MSC3898 and allows us to cleanup this area of the codebase significantly. We want to do this ahead of some further refactoring to make it more maintainable.
Breaking changes:
ExperimentalGroupCallRoomMemberState
type is removedCallMembership.getLocalExpiry()
function is removedBackground:
It is time to get rid of the legacy call format. (Legacy = one call event for all memberships per user. Now we have one event for each. So: Legacy: state_key =
userId
, non-legacy/session events: state_key=_userid_deviceId
The transition has been made and deployed everywhere. No deployed client is using this system without being compatible with the new system.Checklist
public
/exported
symbols have accurate TSDoc documentation.