From 3acbbd06431477d2fbdc1b12879c2235c26caf7e Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 25 Jun 2025 16:21:22 -0400 Subject: [PATCH] Allow Element Call to learn the room name The latest mobile designs for Element Call have it displaying the room name in an "app bar". So the Element Call widget will soon start requesting the capability to learn the room name, and Element Web should auto-approve this capability. --- src/stores/widgets/StopGapWidgetDriver.ts | 3 +++ test/unit-tests/stores/widgets/StopGapWidgetDriver-test.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index d4c0f8930c3..282d6f5d925 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -123,6 +123,9 @@ export class StopGapWidgetDriver extends WidgetDriver { this.allowedCapabilities.add(MatrixCapabilities.MSC4157SendDelayedEvent); this.allowedCapabilities.add(MatrixCapabilities.MSC4157UpdateDelayedEvent); + this.allowedCapabilities.add( + WidgetEventCapability.forStateEvent(EventDirection.Receive, EventType.RoomName).raw, + ); this.allowedCapabilities.add( WidgetEventCapability.forStateEvent(EventDirection.Receive, EventType.RoomMember).raw, ); diff --git a/test/unit-tests/stores/widgets/StopGapWidgetDriver-test.ts b/test/unit-tests/stores/widgets/StopGapWidgetDriver-test.ts index e08a83dd02b..1b646498bb0 100644 --- a/test/unit-tests/stores/widgets/StopGapWidgetDriver-test.ts +++ b/test/unit-tests/stores/widgets/StopGapWidgetDriver-test.ts @@ -99,6 +99,7 @@ describe("StopGapWidgetDriver", () => { "org.matrix.msc2762.send.event:m.room.redaction", "org.matrix.msc2762.receive.event:m.room.redaction", "org.matrix.msc2762.receive.state_event:m.room.create", + "org.matrix.msc2762.receive.state_event:m.room.name", "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",