mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Handle only username subdomains for t.me domain.
This commit is contained in:
@@ -880,7 +880,14 @@ QString TryConvertUrlToLocal(QString url) {
|
||||
if (subdomainMatch) {
|
||||
const auto name = subdomainMatch->captured(2);
|
||||
if (name.size() > 1 && name != "www") {
|
||||
url = subdomainMatch->captured(1) + "t.me/" + name + subdomainMatch->captured(3);
|
||||
const auto result = TryConvertUrlToLocal(
|
||||
subdomainMatch->captured(1)
|
||||
+ "t.me/"
|
||||
+ name
|
||||
+ subdomainMatch->captured(3));
|
||||
return result.startsWith("tg://resolve?domain=")
|
||||
? result
|
||||
: url;
|
||||
}
|
||||
}
|
||||
auto telegramMeMatch = regex_match(qsl("^(https?://)?(www\\.)?(telegram\\.(me|dog)|t\\.me)/(.+)$"), url, matchOptions);
|
||||
|
Reference in New Issue
Block a user