From 4d89402e3db35e01bf872d54d54695b2a89a8d13 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Thu, 27 Jun 2024 15:45:53 -0400 Subject: [PATCH 1/2] 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). --- src/stores/widgets/StopGapWidgetDriver.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 248c520ddd5..43b221dbbac 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -154,6 +154,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) { From b89568575b1f3afa45856a19a869d70cbd9ebc77 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Mon, 15 Jul 2024 16:15:30 -0400 Subject: [PATCH 2/2] Test that call widgets get RoomCreate events --- test/stores/widgets/StopGapWidgetDriver-test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/stores/widgets/StopGapWidgetDriver-test.ts b/test/stores/widgets/StopGapWidgetDriver-test.ts index 6e51d4ae980..7a82e4a2a68 100644 --- a/test/stores/widgets/StopGapWidgetDriver-test.ts +++ b/test/stores/widgets/StopGapWidgetDriver-test.ts @@ -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",