From e4c44dc282d68b76b7261e4ad59bfd231c705260 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 24 Oct 2022 13:49:54 -0400 Subject: [PATCH] Auto-approve rageshake event capabilities for virtual Element Call widgets (#9492) --- src/stores/widgets/StopGapWidgetDriver.ts | 6 ++++++ test/stores/widgets/StopGapWidgetDriver-test.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index ff2619ad59..e1fb1d6729 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -113,6 +113,12 @@ export class StopGapWidgetDriver extends WidgetDriver { this.allowedCapabilities.add(MatrixCapabilities.MSC3846TurnServers); this.allowedCapabilities.add(`org.matrix.msc2762.timeline:${inRoomId}`); + this.allowedCapabilities.add( + WidgetEventCapability.forRoomEvent(EventDirection.Send, "org.matrix.rageshake_request").raw, + ); + this.allowedCapabilities.add( + WidgetEventCapability.forRoomEvent(EventDirection.Receive, "org.matrix.rageshake_request").raw, + ); this.allowedCapabilities.add( WidgetEventCapability.forStateEvent(EventDirection.Receive, EventType.RoomMember).raw, ); diff --git a/test/stores/widgets/StopGapWidgetDriver-test.ts b/test/stores/widgets/StopGapWidgetDriver-test.ts index 0fd2f18be7..7adf38a853 100644 --- a/test/stores/widgets/StopGapWidgetDriver-test.ts +++ b/test/stores/widgets/StopGapWidgetDriver-test.ts @@ -66,6 +66,8 @@ describe("StopGapWidgetDriver", () => { "m.always_on_screen", "town.robin.msc3846.turn_servers", "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.member", "org.matrix.msc2762.send.state_event:org.matrix.msc3401.call", "org.matrix.msc2762.receive.state_event:org.matrix.msc3401.call",