diff --git a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp index a999a05a27..579624c5ce 100644 --- a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp +++ b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp @@ -497,7 +497,7 @@ void AttachWebView::request(const WebViewButton &button) { data.vquery_id().v, qs(data.vurl()), button.text, - button.fromMenu); + button.fromMenu || button.url.isEmpty()); }); }).fail([=](const MTP::Error &error) { _requestId = 0; @@ -742,7 +742,7 @@ void AttachWebView::requestMenu( _action->history->peer->input, _bot->inputUser, MTP_string(url), - MTPstring(), // url + MTPstring(), // start_param MTP_dataJSON(MTP_bytes(Window::Theme::WebViewParams().json)), MTP_string("tdesktop"), MTP_int(_action->replyTo.bare), @@ -800,7 +800,7 @@ void AttachWebView::show( uint64 queryId, const QString &url, const QString &buttonText, - bool fromMenu) { + bool allowClipboardRead) { Expects(_bot != nullptr && _action.has_value()); const auto close = crl::guard(this, [=] { @@ -924,7 +924,7 @@ void AttachWebView::show( .menuButtons = buttons, .handleMenuButton = handleMenuButton, .themeParams = [] { return Window::Theme::WebViewParams(); }, - .allowClipboardRead = fromMenu, + .allowClipboardRead = allowClipboardRead, }); *panel = _panel.get(); started(queryId); diff --git a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.h b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.h index 81d6a824f2..c227149300 100644 --- a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.h +++ b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.h @@ -135,7 +135,7 @@ private: uint64 queryId, const QString &url, const QString &buttonText = QString(), - bool fromMenu = false); + bool allowClipboardRead = false); void confirmAddToMenu( AttachWebViewBot bot, Fn callback = nullptr);