mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix ad to same chat navigation
This commit is contained in:
parent
c7803123e8
commit
32245285db
@ -4298,6 +4298,11 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
|
||||
switch adAttribute.target {
|
||||
case let .peer(id, messageId, startParam):
|
||||
if case let .peer(currentPeerId) = self.chatLocation, currentPeerId == id {
|
||||
if let messageId {
|
||||
self.navigateToMessage(from: nil, to: .id(messageId, nil), rememberInStack: false)
|
||||
}
|
||||
} else {
|
||||
let navigationData: ChatControllerInteractionNavigateToPeer
|
||||
if let bot = message.author as? TelegramUser, bot.botInfo != nil, let startParam = startParam {
|
||||
navigationData = .withBotStartPayload(ChatControllerInitialBotStart(payload: startParam, behavior: .interactive))
|
||||
@ -4314,6 +4319,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
self.openPeer(peer: peer, navigation: navigationData, fromMessage: nil)
|
||||
}
|
||||
})
|
||||
}
|
||||
case let .join(_, joinHash):
|
||||
self.controllerInteraction?.openJoinLink(joinHash)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user