diff --git a/ElementX/Sources/Application/AppCoordinator.swift b/ElementX/Sources/Application/AppCoordinator.swift index aec209805..561a88d47 100644 --- a/ElementX/Sources/Application/AppCoordinator.swift +++ b/ElementX/Sources/Application/AppCoordinator.swift @@ -357,9 +357,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg } func handleUserActivity(_ userActivity: NSUserActivity) { - // `INStartVideoCallIntent` is to be replaced with `INStartCallIntent` - // but calls from Recents still send it ¯\_(ツ)_/¯ - guard let intent = userActivity.interaction?.intent as? INStartVideoCallIntent, + guard let intent = userActivity.interaction?.intent as? INStartCallIntent, let contact = intent.contacts?.first, let roomIdentifier = contact.personHandle?.value else { MXLog.error("Failed retrieving information from userActivity: \(userActivity)") @@ -367,7 +365,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg } MXLog.info("Starting call in room: \(roomIdentifier)") - handleAppRoute(AppRoute.call(roomID: roomIdentifier, isVoiceCall: false), windowType: nil) + handleAppRoute(AppRoute.call(roomID: roomIdentifier, isVoiceCall: intent.callCapability == .audioCall), windowType: nil) } // MARK: - AuthenticationFlowCoordinatorDelegate diff --git a/ElementX/Sources/Application/Application.swift b/ElementX/Sources/Application/Application.swift index fb3bd67f3..706611e3d 100644 --- a/ElementX/Sources/Application/Application.swift +++ b/ElementX/Sources/Application/Application.swift @@ -52,9 +52,7 @@ struct Application: App { guard let url = userActivity.webpageURL else { return } openURL(url, isExternalURL: true) } - .onContinueUserActivity("INStartVideoCallIntent") { userActivity in - // `INStartVideoCallIntent` is to be replaced with `INStartCallIntent` - // but calls from Recents still send it ¯\_(ツ)_/¯ + .onContinueUserActivity("INStartCallIntent") { userActivity in appCoordinator.handleUserActivity(userActivity) } .task {