2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Implement new bot web-app methods.

This commit is contained in:
John Preston
2023-08-29 21:36:12 +04:00
parent 8255de1ba8
commit d77c7a70ab
14 changed files with 478 additions and 236 deletions

View File

@@ -1127,6 +1127,8 @@ auto HtmlWriter::Wrap::pushMessage(
return data.attachMenu
? "You allowed this bot to message you "
"when you added it in the attachment menu."_q
: data.fromRequest
? "You allowed this bot to message you in his web-app."_q
: data.app.isEmpty()
? ("You allowed this bot to message you when you opened "
+ SerializeString(data.app))

View File

@@ -477,6 +477,8 @@ QByteArray SerializeMessage(
}, [&](const ActionBotAllowed &data) {
if (data.attachMenu) {
pushAction("attach_menu_bot_allowed");
} else if (data.fromRequest) {
pushAction("web_app_bot_allowed");
} else if (data.appId) {
pushAction("allow_sending_messages");
push("reason_app_id", data.appId);