2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Update API scheme on layer 142.

This commit is contained in:
John Preston
2022-04-15 17:32:34 +04:00
parent 36b8d03b1d
commit a752c4d9f3
10 changed files with 89 additions and 44 deletions

View File

@@ -1988,7 +1988,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
const auto botId = UserId(d.vbot_id().v);
if (const auto user = peer->asUser()) {
if (user->isBot() && user->id == peerFromUser(botId)) {
if (Data::UpdateBotCommands(user->botInfo->commands, d.vcommands())) {
if (Data::UpdateBotCommands(user->botInfo->commands, &d.vcommands())) {
session().data().botCommandsChanged(user);
}
}
@@ -2015,7 +2015,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
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())) {
if (Data::ApplyBotMenuButton(info, &d.vbutton())) {
session().data().botCommandsChanged(bot);
}
}