Allow Element Call to send call notifications (#30404)

* Allow Element Call to send call notifications

Currently Element Web is responsible for sending the call notification event, but this is planned to be changed soon. As of the upcoming Element Call 0.14.0 release, it will request the capability to send call notifications itself, and we should auto-approve this capability.

* Add reaction capability missing from test

Element Call does in fact request this one.
This commit is contained in:
Robin 2025-07-27 15:37:10 +02:00 committed by GitHub
parent c2c040dd42
commit a23a2c03d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -168,6 +168,7 @@ export class StopGapWidgetDriver extends WidgetDriver {
WidgetEventCapability.forStateEvent(EventDirection.Receive, EventType.RoomCreate).raw,
);
const sendRoomEvents = [EventType.CallNotify, EventType.RTCNotification];
const sendRecvRoomEvents = [
"io.element.call.encryption_keys",
"org.matrix.rageshake_request",
@ -175,10 +176,10 @@ export class StopGapWidgetDriver extends WidgetDriver {
EventType.RoomRedaction,
"io.element.call.reaction",
];
for (const eventType of sendRecvRoomEvents) {
for (const eventType of [...sendRoomEvents, ...sendRecvRoomEvents])
this.allowedCapabilities.add(WidgetEventCapability.forRoomEvent(EventDirection.Send, eventType).raw);
for (const eventType of sendRecvRoomEvents)
this.allowedCapabilities.add(WidgetEventCapability.forRoomEvent(EventDirection.Receive, eventType).raw);
}
const sendRecvToDevice = [
EventType.CallInvite,

View File

@ -92,12 +92,16 @@ 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.msc4075.call.notify",
"org.matrix.msc2762.send.event:org.matrix.msc4075.rtc.notification",
"org.matrix.msc2762.send.event:org.matrix.rageshake_request",
"org.matrix.msc2762.receive.event:org.matrix.rageshake_request",
"org.matrix.msc2762.send.event:m.reaction",
"org.matrix.msc2762.receive.event:m.reaction",
"org.matrix.msc2762.send.event:m.room.redaction",
"org.matrix.msc2762.receive.event:m.room.redaction",
"org.matrix.msc2762.send.event:io.element.call.reaction",
"org.matrix.msc2762.receive.event:io.element.call.reaction",
"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",