1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Let Element Call widget receive m.room.create (#12710)

* Let Element Call widget receive m.room.create

This allows the widget to check the room version without prompting the
user to grant that capability, so the widget can know about
version-specific auth rules (namely MSC3779).

* Test that call widgets get RoomCreate events
This commit is contained in:
Andrew Ferrazzutti
2024-07-16 23:07:40 +09:00
committed by GitHub
parent c843a4163a
commit 59d08d84b0
2 changed files with 5 additions and 0 deletions

View File

@ -172,6 +172,10 @@ export class StopGapWidgetDriver extends WidgetDriver {
this.allowedCapabilities.add(
WidgetEventCapability.forStateEvent(EventDirection.Receive, "org.matrix.msc3401.call.member").raw,
);
// for determining auth rules specific to the room version
this.allowedCapabilities.add(
WidgetEventCapability.forStateEvent(EventDirection.Receive, EventType.RoomCreate).raw,
);
const sendRecvRoomEvents = ["io.element.call.encryption_keys"];
for (const eventType of sendRecvRoomEvents) {

View File

@ -95,6 +95,7 @@ describe("StopGapWidgetDriver", () => {
"org.matrix.msc2762.timeline:!1:example.org",
"org.matrix.msc2762.send.event:org.matrix.rageshake_request",
"org.matrix.msc2762.receive.event:org.matrix.rageshake_request",
"org.matrix.msc2762.receive.state_event:m.room.create",
"org.matrix.msc2762.receive.state_event:m.room.member",
"org.matrix.msc2762.receive.state_event:org.matrix.msc3401.call",
"org.matrix.msc2762.send.state_event:org.matrix.msc3401.call.member#@alice:example.org",