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:
@@ -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))
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user