mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix url parsing
This commit is contained in:
parent
12f7419b55
commit
ed139973e0
@ -289,13 +289,13 @@ final class ChatMessageWebpageBubbleContentNode: ChatMessageBubbleContentNode {
|
||||
actionTitle = item.presentationData.strings.Conversation_ViewGroup
|
||||
case "telegram_message":
|
||||
actionTitle = item.presentationData.strings.Conversation_ViewMessage
|
||||
case "telegram_voicechat":
|
||||
case "telegram_voicechat", "telegram_livestream", "telegram_videochat":
|
||||
if let channel = item.message.peers[item.message.id.peerId] as? TelegramChannel, case let .broadcast = channel.info {
|
||||
title = item.presentationData.strings.Conversation_LiveStream
|
||||
} else {
|
||||
title = item.presentationData.strings.Conversation_VoiceChat
|
||||
}
|
||||
if webpage.url.contains("voicechat=") {
|
||||
if webpage.url.contains("voicechat=") || webpage.url.contains("videochat=") || webpage.url.contains("livestream=") {
|
||||
actionTitle = item.presentationData.strings.Conversation_JoinVoiceChatAsSpeaker
|
||||
} else {
|
||||
actionTitle = item.presentationData.strings.Conversation_JoinVoiceChatAsListener
|
||||
|
@ -624,10 +624,10 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
|
||||
game = value
|
||||
} else if queryItem.name == "post" {
|
||||
post = value
|
||||
} else if queryItem.name == "voicechat" {
|
||||
} else if queryItem.name == "voicechat" || queryItem.name == "videochat" || queryItem.name == "livestream" {
|
||||
voiceChat = value
|
||||
}
|
||||
} else if queryItem.name == "voicechat" {
|
||||
} else if queryItem.name == "voicechat" || queryItem.name == "videochat" || queryItem.name == "livestream" {
|
||||
voiceChat = ""
|
||||
}
|
||||
}
|
||||
|
@ -136,10 +136,10 @@ public func parseInternalUrl(query: String) -> ParsedInternalUrl? {
|
||||
return .peerName(peerName, .groupBotStart(value))
|
||||
} else if queryItem.name == "game" {
|
||||
return nil
|
||||
} else if queryItem.name == "voicechat" {
|
||||
} else if queryItem.name == "voicechat" || queryItem.name == "videochat" || queryItem.name == "livestream" {
|
||||
return .peerName(peerName, .voiceChat(value))
|
||||
}
|
||||
} else if queryItem.name == "voicechat" {
|
||||
} else if queryItem.name == "voicechat" || queryItem.name == "videochat" || queryItem.name == "livestream" {
|
||||
return .peerName(peerName, .voiceChat(nil))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user