matrix-js-sdk icon indicating copy to clipboard operation
matrix-js-sdk copied to clipboard

[MatrixRTC] Use relation based call membership to compute `create_ts()`

Open toger5 opened this issue 2 months ago • 3 comments

This PR changes the construction of the CallMembership object. It will add an optional relatedEvent parameter which will store initial connect event for this call participation.

This is then used to fetch metadata (like application) and the origin_server_ts of the initial join event.

This requires that MatrixRTCSession.sessionMembershipsForSlot becomes async since it now also needs to fetch related events.

This change needs a bit of test adjustments and other places of the codebase need updating.

Checklist

  • [x] Tests written for new code (and old code if feasible).
  • [x] New or updated public/exported symbols have accurate TSDoc documentation.
  • [x] Linter and other CI checks pass.
  • [x] Sign-off given on the changes (see CONTRIBUTING.md).

toger5 avatar Oct 06 '25 15:10 toger5

@toger5 Is the diff meant to be as big as it is? I think I'm looking at a lot of lint fixes, or something.

robintown avatar Oct 08 '25 04:10 robintown

Is the diff meant to be as big as it is? Yes the diff is meant to be this big. There is a very large amount of lines which add async and await

On top of this, the construct for callMembership has a signature change which requires a change in makeMockEvent.

before new CallMembership(event, event.content, ....) now new CallMembership(event, relatedEvent,...)event.content will be aquired indirectly by reading event.getContent().relatedEvent` is new.

toger5 avatar Oct 08 '25 08:10 toger5

Could we please be a little more mindful to reviewers, there's little point in reviewing something with so many CI failures given it'll need re-reviewing after fixing.

Converted it to draft. As it should be until ci is sorted. Sorry for the confusion/overhead.

toger5 avatar Oct 09 '25 12:10 toger5