2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Pass context chat from one webview to another.

This commit is contained in:
John Preston
2023-08-15 15:01:18 +02:00
parent 87f52cf7df
commit d57d95c53f
7 changed files with 33 additions and 7 deletions

View File

@@ -521,10 +521,13 @@ void SessionNavigation::showPeerByLinkResolved(
const auto contextPeer = item
? item->history()->peer
: bot;
const auto action = bot->session().attachWebView().lookupLastAction(
info.clickFromAttachBotWebviewUrl
).value_or(Api::SendAction(bot->owner().history(contextPeer)));
crl::on_main(this, [=] {
bot->session().attachWebView().requestApp(
parentController(),
Api::SendAction(bot->owner().history(contextPeer)),
action,
bot,
info.botAppName,
info.startToken,

View File

@@ -217,6 +217,7 @@ public:
InlineBots::PeerTypes attachBotChooseTypes;
std::optional<QString> voicechatHash;
FullMsgId clickFromMessageId;
QString clickFromAttachBotWebviewUrl;
};
void showPeerByLink(const PeerByLinkInfo &info);