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

Update bot menu attach in realtime.

This commit is contained in:
John Preston
2022-04-11 12:16:34 +04:00
parent c73eb5d791
commit be6ee73a04
4 changed files with 37 additions and 14 deletions

View File

@@ -2010,6 +2010,17 @@ void Updates::feedUpdate(const MTPUpdate &update) {
session().data().webViewResultSent({ .queryId = d.vquery_id().v });
} break;
case mtpc_updateBotMenuButton: {
const auto &d = update.c_updateBotMenuButton();
if (const auto bot = session().data().userLoaded(d.vbot_id())) {
if (const auto info = bot->botInfo.get(); info && info->inited) {
if (Data::ApplyBotMenuButton(info, d.vbutton())) {
session().data().botCommandsChanged(bot);
}
}
}
} break;
case mtpc_updatePendingJoinRequests: {
const auto &d = update.c_updatePendingJoinRequests();
if (const auto peer = session().data().peerLoaded(peerFromMTP(d.vpeer()))) {