mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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) {
|
bool WebViewInstance::botHandleLocalUri(QString uri, bool keepOpen) {
|
||||||
const auto local = Core::TryConvertUrlToLocal(uri);
|
const auto local = Core::TryConvertUrlToLocal(uri);
|
||||||
if (uri == local || Core::InternalPassportLink(local)) {
|
if (Core::InternalPassportLink(local)) {
|
||||||
return local.startsWith(u"tg://"_q);
|
return true;
|
||||||
} else if (!local.startsWith(u"tg://"_q, Qt::CaseInsensitive)) {
|
} else if (!local.startsWith(u"tg://"_q, Qt::CaseInsensitive)
|
||||||
|
&& !local.startsWith(u"tonsite://"_q, Qt::CaseInsensitive)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto bot = _bot;
|
const auto bot = _bot;
|
||||||
|
|
Loading…
Add table
Reference in a new issue