2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 07:35:12 +00:00

Show terms on attach bot direct link app.

This commit is contained in:
John Preston
2023-09-12 10:03:51 +04:00
parent ef969df86e
commit 36f1a18b3b
4 changed files with 99 additions and 47 deletions

View File

@@ -589,20 +589,21 @@ void SessionNavigation::showPeerByLinkResolved(
: nullptr;
bot->session().attachWebView().requestAddToMenu(
bot,
*info.attachBotToggleCommand,
InlineBots::AddToMenuOpenAttach{
.startCommand = *info.attachBotToggleCommand,
.chooseTypes = info.attachBotChooseTypes,
},
parentController(),
(contextUser
? Api::SendAction(
contextUser->owner().history(contextUser))
: std::optional<Api::SendAction>()),
info.attachBotChooseTypes);
: std::optional<Api::SendAction>()));
} else if (bot && info.attachBotMenuOpen) {
bot->session().attachWebView().requestAddToMenu(
bot,
std::nullopt,
InlineBots::AddToMenuOpenMenu(),
parentController(),
std::optional<Api::SendAction>(),
{});
std::optional<Api::SendAction>());
} else {
crl::on_main(this, [=] {
showPeerHistory(peer, params, msgId);