mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-18 20:30:51 +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 {
|
if activateInput {
|
||||||
controller.activateInput()
|
controller.activateInput()
|
||||||
}
|
}
|
||||||
|
if let botStart = botStart {
|
||||||
|
controller.updateChatPresentationInterfaceState(interactive: false) { state -> ChatPresentationInterfaceState in
|
||||||
|
return state.updatedBotStartPayload(botStart.payload)
|
||||||
|
}
|
||||||
|
}
|
||||||
found = true
|
found = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -48,6 +53,11 @@ public func navigateToChatController(navigationController: NavigationController,
|
|||||||
let controller: ChatController
|
let controller: ChatController
|
||||||
if let chatController = chatController {
|
if let chatController = chatController {
|
||||||
controller = chatController
|
controller = chatController
|
||||||
|
if let botStart = botStart {
|
||||||
|
controller.updateChatPresentationInterfaceState(interactive: false) { state -> ChatPresentationInterfaceState in
|
||||||
|
return state.updatedBotStartPayload(botStart.payload)
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
controller = ChatController(context: context, chatLocation: chatLocation, messageId: messageId, botStart: botStart)
|
controller = ChatController(context: context, chatLocation: chatLocation, messageId: messageId, botStart: botStart)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user