From f7565ef1043387519991921c7e5f756e4d035f76 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 24 Jul 2025 18:50:03 +0200 Subject: [PATCH] Request capability to send call notifications 0e0fba657558964376e6f2375271630d9cf52b84 added the ability to send call notification events when starting a call, but I forgot to give the widget the right capabilities to do this. The effect was that notifications just wouldn't send in widget mode. --- src/widget.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widget.ts b/src/widget.ts index b7f51ace..a122f70d 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -106,6 +106,10 @@ export const widget = ((): WidgetHelpers | null => { if (!baseUrl) throw new Error("Base URL must be supplied"); // These are all the event types the app uses + const sendEvent = [ + EventType.CallNotify, // Sent as a deprecated fallback + EventType.RTCNotification, + ]; const sendRecvEvent = [ "org.matrix.rageshake_request", EventType.CallEncryptionKeysPrefix, @@ -129,6 +133,7 @@ export const widget = ((): WidgetHelpers | null => { { eventType: EventType.RoomEncryption }, { eventType: EventType.GroupCallMemberPrefix }, ]; + const sendRecvToDevice = [ EventType.CallInvite, EventType.CallCandidates, @@ -146,7 +151,7 @@ export const widget = ((): WidgetHelpers | null => { const client = createRoomWidgetClient( api, { - sendEvent: sendRecvEvent, + sendEvent: [...sendEvent, ...sendRecvEvent], receiveEvent: sendRecvEvent, sendState, receiveState,