From f4296e0f0544614a070283cdc49bc3fc7b14686a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sun, 27 Aug 2023 18:09:08 +0200 Subject: [PATCH] Support for embedded E2EE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/models/Call.ts | 1 + src/stores/widgets/StopGapWidgetDriver.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/models/Call.ts b/src/models/Call.ts index c45bf949250..5b27f537663 100644 --- a/src/models/Call.ts +++ b/src/models/Call.ts @@ -654,6 +654,7 @@ export class ElementCall extends Call { analyticsID, }); + if (client.isRoomEncrypted(groupCall.room.roomId)) params.append("perParticipantE2EE", ""); if (SettingsStore.getValue("fallbackICEServerAllowed")) params.append("allowIceFallback", ""); if (SettingsStore.getValue("feature_allow_screen_share_only_mode")) params.append("allowVoipWithNoMedia", ""); diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 8ae91962416..7b40272228d 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -149,6 +149,12 @@ export class StopGapWidgetDriver extends WidgetDriver { WidgetEventCapability.forStateEvent(EventDirection.Receive, "org.matrix.msc3401.call.member").raw, ); + const sendRecvRoomEvents = ["io.element.call.encryption_key"]; + for (const eventType of sendRecvRoomEvents) { + this.allowedCapabilities.add(WidgetEventCapability.forRoomEvent(EventDirection.Send, eventType).raw); + this.allowedCapabilities.add(WidgetEventCapability.forRoomEvent(EventDirection.Receive, eventType).raw); + } + const sendRecvToDevice = [ EventType.CallInvite, EventType.CallCandidates,