mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 20:39:24 +00:00
Delegate the sending of call notifications to Element Call (#4370)
* Stop sending call notifications manually The Element Call widget can now assume responsibility for sending them when you start a call. * Bump Element Call embedded package to v0.14.0 * Delegate the sending of call notifications to Element Call * Update the SDK. * Use 'is' prefix for boolean --------- Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
@@ -50,7 +50,7 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
||||
switch configuration.kind {
|
||||
case .genericCallLink(let url):
|
||||
widgetDriver = GenericCallLinkWidgetDriver(url: url)
|
||||
case .roomCall(let roomProxy, let clientProxy, _, _, _, _, _):
|
||||
case .roomCall(let roomProxy, let clientProxy, _, _, _, _):
|
||||
guard let deviceID = clientProxy.deviceID else { fatalError("Missing device ID for the call.") }
|
||||
widgetDriver = roomProxy.elementCallWidgetDriver(deviceID: deviceID)
|
||||
}
|
||||
@@ -174,7 +174,7 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
||||
state.url = url
|
||||
// We need widget messaging to work before enabling CallKit, otherwise mute, hangup etc do nothing.
|
||||
|
||||
case .roomCall(let roomProxy, _, let clientID, let elementCallBaseURL, let elementCallBaseURLOverride, let colorScheme, let notifyOtherParticipants):
|
||||
case .roomCall(let roomProxy, _, let clientID, let elementCallBaseURL, let elementCallBaseURLOverride, let colorScheme):
|
||||
Task { [weak self] in
|
||||
guard let self else { return }
|
||||
|
||||
@@ -217,10 +217,6 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
||||
|
||||
await elementCallService.setupCallSession(roomID: roomProxy.id,
|
||||
roomDisplayName: roomProxy.infoPublisher.value.displayName ?? roomProxy.id)
|
||||
|
||||
if notifyOtherParticipants {
|
||||
_ = await roomProxy.sendCallNotificationIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user