mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
This reverts commit 99423bc437.
This commit is contained in:
@@ -76,32 +76,31 @@ class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriv
|
||||
}
|
||||
|
||||
async let useEncryption = (try? room.latestEncryptionState() == .encrypted) ?? false
|
||||
async let intent = room.joinCallIntent
|
||||
|
||||
async let isDirect = room.isDirect()
|
||||
let widgetSettings: WidgetSettings
|
||||
|
||||
do {
|
||||
widgetSettings = try await newVirtualElementCallWidget(props: .init(elementCallUrl: baseURL.absoluteString,
|
||||
widgetId: widgetID,
|
||||
parentUrl: nil,
|
||||
header: .appBar,
|
||||
hideHeader: true,
|
||||
preload: nil,
|
||||
fontScale: nil,
|
||||
appPrompt: false,
|
||||
confineToRoom: true,
|
||||
font: nil,
|
||||
encryption: useEncryption ? .perParticipantKeys : .unencrypted,
|
||||
intent: .startCall,
|
||||
hideScreensharing: false,
|
||||
posthogUserId: nil,
|
||||
posthogApiHost: analyticsConfiguration?.posthogAPIHost,
|
||||
posthogApiKey: analyticsConfiguration?.posthogAPIKey,
|
||||
rageshakeSubmitUrl: rageshakeURL,
|
||||
sentryDsn: analyticsConfiguration?.sentryDSN,
|
||||
sentryEnvironment: nil),
|
||||
config: .init(intent: intent,
|
||||
skipLobby: nil,
|
||||
header: nil,
|
||||
hideHeader: nil,
|
||||
preload: nil,
|
||||
appPrompt: nil,
|
||||
confineToRoom: nil,
|
||||
hideScreensharing: nil,
|
||||
controlledAudioDevices: nil,
|
||||
sendNotificationType: nil))
|
||||
sentryEnvironment: nil,
|
||||
controlledMediaDevices: !ProcessInfo.processInfo.isiOSAppOnMac,
|
||||
sendNotificationType: isDirect ? .ring : .notification))
|
||||
} catch {
|
||||
MXLog.error("Failed to build widget settings: \(error)")
|
||||
return .failure(.failedBuildingWidgetSettings)
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// Copyright 2025 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import MatrixRustSDK
|
||||
|
||||
extension RoomProtocol {
|
||||
var joinCallIntent: Intent {
|
||||
get async {
|
||||
switch await (hasActiveRoomCall(), isDirect()) {
|
||||
case (true, true): .joinExistingDm
|
||||
case (true, false): .joinExisting
|
||||
case (false, true): .startCallDm
|
||||
case (false, false): .startCall
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user