diff --git a/submodules/TelegramUI/Sources/AppDelegate.swift b/submodules/TelegramUI/Sources/AppDelegate.swift index b1ea96b8da7..c94f9eef812 100644 --- a/submodules/TelegramUI/Sources/AppDelegate.swift +++ b/submodules/TelegramUI/Sources/AppDelegate.swift @@ -2545,6 +2545,18 @@ private func extractAccountManagerState(records: AccountRecordsView Void) -> Bool { if #available(iOS 10.0, *) { + let startCallHandlePrefix = "TGCA" + if userActivity.activityType == NSStringFromClass(INStartCallIntent.self), + let handle = userActivity.userInfo?["handle"] as? String, + handle.hasPrefix(startCallHandlePrefix), + let peerIdValue = Int64(handle.dropFirst(startCallHandlePrefix.count)) { + let peerId = PeerId(peerIdValue) + if peerId.namespace == Namespaces.Peer.CloudUser { + self.startCallWhenReady(accountId: nil, peerId: peerId, isVideo: false) + return true + } + } + var startCallContacts: [INPerson]? var isVideo = false if let startCallIntent = userActivity.interaction?.intent as? SupportedStartCallIntent {