mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-15 18:59:54 +00:00
Fixed bot payload handover when opening the bot's start url with the bot's chat already opened
This commit is contained in:
parent
5937d985f3
commit
185a3c4dad
@ -38,6 +38,11 @@ public func navigateToChatController(navigationController: NavigationController,
|
||||
if activateInput {
|
||||
controller.activateInput()
|
||||
}
|
||||
if let botStart = botStart {
|
||||
controller.updateChatPresentationInterfaceState(interactive: false) { state -> ChatPresentationInterfaceState in
|
||||
return state.updatedBotStartPayload(botStart.payload)
|
||||
}
|
||||
}
|
||||
found = true
|
||||
break
|
||||
}
|
||||
@ -48,6 +53,11 @@ public func navigateToChatController(navigationController: NavigationController,
|
||||
let controller: ChatController
|
||||
if let chatController = chatController {
|
||||
controller = chatController
|
||||
if let botStart = botStart {
|
||||
controller.updateChatPresentationInterfaceState(interactive: false) { state -> ChatPresentationInterfaceState in
|
||||
return state.updatedBotStartPayload(botStart.payload)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
controller = ChatController(context: context, chatLocation: chatLocation, messageId: messageId, botStart: botStart)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user