Fix calls from Phone recents opening without starting - #2304
Open
vasyaskery1-jpg wants to merge 1 commit into
Open
Fix calls from Phone recents opening without starting#2304vasyaskery1-jpg wants to merge 1 commit into
vasyaskery1-jpg wants to merge 1 commit into
Conversation
vhf2jghn76-sys
approved these changes
Aug 26, 2026
vhf2jghn76-sys
approved these changes
Aug 26, 2026
| |> mapToSignal { sharedApplicationContext -> Signal<(SharedAccountContextImpl, AuthorizedApplicationContext?, UnauthorizedApplicationContext?), NoError> in | ||
| combineLatest(self.context.get(), self.authContext.get()) | ||
| |> filter { $0 != nil || $1 != nil } | ||
| |> take(1) |
| return true | ||
| } | ||
| } | ||
|
|
| return true | ||
| } | ||
| } | ||
|
|
| return true | ||
| } | ||
| } | ||
|
|
| self.startCallWhenReady(accountId: nil, peerId: peerId, isVideo: false) | ||
| return true | ||
| } | ||
| } |
| handle.hasPrefix(startCallHandlePrefix), | ||
| let peerIdValue = Int64(handle.dropFirst(startCallHandlePrefix.count)) { | ||
| let peerId = PeerId(peerIdValue) | ||
| if peerId.namespace == Namespaces.Peer.CloudUser { |
There was a problem hiding this comment.
Suggested change
| if peerId.namespace == Namespaces.Peer.CloudUser { | |
| if peerId.namespace == Namespaces.Peer.CloudUser {```suggestion | |
| if peerId.namespace == Namespaces.Peer.CloudUser { |
| if userActivity.activityType == NSStringFromClass(INStartCallIntent.self), | ||
| let handle = userActivity.userInfo?["handle"] as? String, | ||
| handle.hasPrefix(startCallHandlePrefix), | ||
| let peerIdValue = Int64(handle.dropFirst(startCallHandlePrefix.count)) { |
There was a problem hiding this comment.
Suggested change
| let peerIdValue = Int64(handle.dropFirst(startCallHandlePrefix.count)) { | |
| let peerIdValue = Int64(handle.dropFirst(startCallHandlePrefix.count)) {```suggestion | |
| let peerIdValue = Int64(handle.dropFirst(startCallHandlePrefix.count)) { |
| if #available(iOS 10.0, *) { | ||
| let startCallHandlePrefix = "TGCA" | ||
| if userActivity.activityType == NSStringFromClass(INStartCallIntent.self), | ||
| let handle = userActivity.userInfo?["handle"] as? String, |
There was a problem hiding this comment.
Suggested change
| let handle = userActivity.userInfo?["handle"] as? String, | |
| let handle = userActivity.userInfo?["handle"] as? String, |
| } | ||
|
|
||
| self.openUrl(url: url) | ||
| return true |
| |> filter { $0 != nil || $1 != nil } | ||
| |> take(1) | ||
| |> map { context, authContext -> (SharedAccountContextImpl, AuthorizedApplicationContext?, UnauthorizedApplicationContext?) in | ||
| return (sharedApplicationContext.sharedContext, context, authContext) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NSUserActivitypayload produced by the Siri IntentsINStartCallIntenthandlerTGCAprefix, and cloud-user peer namespace before starting the callinteraction?.intentcontact-resolution pathProblem
When a user taps a Telegram call in Phone > Recents, the Siri Intents extension resolves the contact and returns
.continueInAppwithuserInfo["handle"] = "TGCA<peerId>".AppDelegate.application(_:continue:restorationHandler:)currently only inspectsuserActivity.interaction?.intent. When the continuation activity contains the serializedTGCAhandle but no interaction, Telegram opens and returnstruewithout starting a call.This change consumes that existing payload and forwards the decoded peer to
startCallWhenReady, which reaches the normal call flow.Validation
git diff --checkINStartCallIntentactivity type andTGCA<peerId>formatNot run on an iPhone because a macOS/Xcode signing environment was not available.