2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Update API scheme to layer 120.

This commit is contained in:
John Preston
2020-10-06 15:58:16 +03:00
parent eb27763cae
commit cc28ba4284
21 changed files with 113 additions and 105 deletions

View File

@@ -1998,31 +1998,6 @@ void Updates::feedUpdate(const MTPUpdate &update) {
}
} break;
// Pinned message.
case mtpc_updateUserPinnedMessage: {
const auto &d = update.c_updateUserPinnedMessage();
if (const auto user = session().data().userLoaded(d.vuser_id().v)) {
user->setPinnedMessageId(d.vid().v);
}
} break;
case mtpc_updateChatPinnedMessage: {
const auto &d = update.c_updateChatPinnedMessage();
if (const auto chat = session().data().chatLoaded(d.vchat_id().v)) {
const auto status = chat->applyUpdateVersion(d.vversion().v);
if (status == ChatData::UpdateStatus::Good) {
chat->setPinnedMessageId(d.vid().v);
}
}
} break;
case mtpc_updateChannelPinnedMessage: {
const auto &d = update.c_updateChannelPinnedMessage();
if (const auto channel = session().data().channelLoaded(d.vchannel_id().v)) {
channel->setPinnedMessageId(d.vid().v);
}
} break;
////// Cloud sticker sets
case mtpc_updateNewStickerSet: {
const auto &d = update.c_updateNewStickerSet();