Various improvements

This commit is contained in:
Ilya Laktyushin
2022-06-05 17:25:10 +04:00
parent 699c703c94
commit b69a0b6b3d
16 changed files with 216 additions and 35 deletions

View File

@@ -635,6 +635,7 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
var voiceChat: String?
var attach: String?
var startAttach: String?
var choose: String?
if let queryItems = components.queryItems {
for queryItem in queryItems {
if let value = queryItem.value {
@@ -658,6 +659,8 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
attach = value
} else if queryItem.name == "startattach" {
startAttach = value
} else if queryItem.name == "choose" {
choose = value
}
} else if ["voicechat", "videochat", "livestream"].contains(queryItem.name) {
voiceChat = ""
@@ -697,6 +700,9 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
} else {
result += "?startattach"
}
if let choose = choose {
result += "&choose=\(choose)"
}
}
convertedUrl = result
}