mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Allow opening tonsite:// from web apps.
This commit is contained in:
parent
11c91c1a42
commit
0af3028cd6
1 changed files with 4 additions and 3 deletions
|
@ -1117,9 +1117,10 @@ Webview::ThemeParams WebViewInstance::botThemeParams() {
|
|||
|
||||
bool WebViewInstance::botHandleLocalUri(QString uri, bool keepOpen) {
|
||||
const auto local = Core::TryConvertUrlToLocal(uri);
|
||||
if (uri == local || Core::InternalPassportLink(local)) {
|
||||
return local.startsWith(u"tg://"_q);
|
||||
} else if (!local.startsWith(u"tg://"_q, Qt::CaseInsensitive)) {
|
||||
if (Core::InternalPassportLink(local)) {
|
||||
return true;
|
||||
} else if (!local.startsWith(u"tg://"_q, Qt::CaseInsensitive)
|
||||
&& !local.startsWith(u"tonsite://"_q, Qt::CaseInsensitive)) {
|
||||
return false;
|
||||
}
|
||||
const auto bot = _bot;
|
||||
|
|
Loading…
Add table
Reference in a new issue