diff --git a/Telegram/SourceFiles/ayu/ayu_url_handlers.cpp b/Telegram/SourceFiles/ayu/ayu_url_handlers.cpp index 5f079f5e8..10546d936 100644 --- a/Telegram/SourceFiles/ayu/ayu_url_handlers.cpp +++ b/Telegram/SourceFiles/ayu/ayu_url_handlers.cpp @@ -9,6 +9,7 @@ #include "base/qthelp_url.h" #include "lang_auto.h" +#include "mainwindow.h" #include "ui/boxes/confirm_box.h" #include "ayu/utils/telegram_helpers.h" #include "boxes/abstract_box.h" @@ -54,4 +55,16 @@ bool ResolveUser( return true; } +bool HandleAyu( + Window::SessionController *controller, + const Match &match, + const QVariant &context) +{ + if (!controller) { + return false; + } + controller->showToast(QString(":3"), 500); + return true; +} + } \ No newline at end of file diff --git a/Telegram/SourceFiles/ayu/ayu_url_handlers.h b/Telegram/SourceFiles/ayu/ayu_url_handlers.h index 6c025573a..6a85b650c 100644 --- a/Telegram/SourceFiles/ayu/ayu_url_handlers.h +++ b/Telegram/SourceFiles/ayu/ayu_url_handlers.h @@ -19,4 +19,9 @@ bool ResolveUser( const Match &match, const QVariant &context); +bool HandleAyu( + Window::SessionController *controller, + const Match &match, + const QVariant &context); + } \ No newline at end of file diff --git a/Telegram/SourceFiles/core/local_url_handlers.cpp b/Telegram/SourceFiles/core/local_url_handlers.cpp index 64c86668a..49b4a9e22 100644 --- a/Telegram/SourceFiles/core/local_url_handlers.cpp +++ b/Telegram/SourceFiles/core/local_url_handlers.cpp @@ -1003,6 +1003,10 @@ const std::vector &LocalUrlHandlers() { u"^user\\?(.+)(#|$)"_q, AyuUrlHandlers::ResolveUser }, + { + u"^ayu/?(.+)?(#|$)"_q, + AyuUrlHandlers::HandleAyu + }, { u"^([^\\?]+)(\\?|#|$)"_q, HandleUnknown