Fix open url

This commit is contained in:
Ali 2023-10-18 01:26:32 +04:00
parent 642b934cb9
commit e48e463d51

View File

@ -17939,7 +17939,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
func openUrl(_ url: String, concealed: Bool, forceExternal: Bool = false, skipUrlAuth: Bool = false, skipConcealedAlert: Bool = false, message: Message? = nil, commit: @escaping () -> Void = {}) {
self.commitPurposefulAction()
if let message, let webpage = message.media.first(where: { $0 is TelegramMediaWebpage }) as? TelegramMediaWebpage, case let .Loaded(content) = webpage.content, content.url == url {
if let message, let webpage = message.media.first(where: { $0 is TelegramMediaWebpage }) as? TelegramMediaWebpage, case let .Loaded(content) = webpage.content, content.url == url, content.instantPage != nil {
if let navigationController = self.navigationController as? NavigationController {
self.context.sharedContext.openChatInstantPage(context: self.context, message: message, sourcePeerType: nil, navigationController: navigationController)
return