Skip to content

Conversation

@robintown
Copy link
Member

@robintown robintown commented Jan 16, 2026

This gives Element Call widgets the ability to send and receive sticky RTC membership events.

Depends on matrix-org/matrix-js-sdk#5142
Closes #3677

To-do:

@robintown robintown added the PR-Improvement Release note category. A PR that improves EC's performance or stability. label Jan 16, 2026
@robintown robintown added the X-Blocked Cannot be merged due to external dependencies label Jan 16, 2026
This gives Element Call widgets the ability to send and receive sticky RTC membership events.
@robintown robintown force-pushed the robin/sticky-widget branch from 4c22402 to d516f0f Compare January 21, 2026 18:59
@robintown robintown marked this pull request as ready for review January 21, 2026 19:00
@robintown robintown requested a review from a team as a code owner January 21, 2026 19:00
Copy link
Contributor

@toger5 toger5 left a comment

Choose a reason for hiding this comment

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

This looks great.
We cannot yet approve since we need

  • the correct js-sdk version
  • Decide what we do with the test coverage (I think a simple test to confirm that we call createRoomWidgetClient with the correct params would be good. Everything on top would just test already tested (in the js-sdk) code)

@robintown
Copy link
Member Author

Ah, I was going to override the coverage requirement. It's a 3 line change, and I generally don't see value in tests that are a close copy of what the code already says.

@BillCarsonFr
Copy link
Member

BillCarsonFr commented Jan 22, 2026

Ah, I was going to override the coverage requirement. It's a 3 line change, and I generally don't see value in tests that are a close copy of what the code already says.

What do you mean but close to the code?

Wouldn't it be good to have a test that check what the EC widget is calling the expected list of permissions? when creating the room widget client?

@toger5 toger5 added X-Blocked Cannot be merged due to external dependencies and removed X-Blocked Cannot be merged due to external dependencies labels Jan 22, 2026
@toger5 toger5 removed the X-Blocked Cannot be merged due to external dependencies label Jan 22, 2026
Copy link
Member

@BillCarsonFr BillCarsonFr left a comment

Choose a reason for hiding this comment

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

Thx for all the tests. Maybe in the future would protect us from unoticed removal of some capability ;)

@toger5 toger5 merged commit 330ad34 into livekit Jan 22, 2026
19 checks passed
Comment on lines +54 to +68
const sendEvent = [
EventType.CallNotify, // Sent as a deprecated fallback
EventType.RTCNotification,
];
const sendRecvEvent = [
"org.matrix.rageshake_request",
EventType.CallEncryptionKeysPrefix,
EventType.Reaction,
EventType.RoomRedaction,
ElementCallReactionEventType,
EventType.RTCDecline,
EventType.RTCMembership,
];

const sendState = [
Copy link
Member Author

Choose a reason for hiding this comment

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

@BillCarsonFr For the record this is what I was referring to with the test being a close copy of the code: The obvious way to write it has all the same lists from widget.ts duplicated here, with an expect at the end rather than a function call.

My take is that writing tests like this is busywork, since they don't tell the reviewer anything that they wouldn't have already known from reading the source file. In general my attitude toward tests - maybe an unpopular opinion :) - is that properties of code that are trivial or self-evident do not need testing.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also can get behind that. But there is some hardcoded values in there that we also check.
I was considering just writing down the full list as raw strings. But for the sake of time made it like that.

But what makes this a bit of a maintenance. burden also has the advantage, that if I mess around with the widget file, the test will force me to rethink if that is what I actually want to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Improvement Release note category. A PR that improves EC's performance or stability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable Element Call widgets to send sticky RTC membership events

3 participants