2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Update API scheme to layer 123.

This commit is contained in:
John Preston
2020-12-29 16:39:10 +04:00
parent b562a4a479
commit b396244606
9 changed files with 67 additions and 33 deletions

View File

@@ -388,12 +388,13 @@ void ApplyChatUpdate(not_null<ChatData*> chat, const MTPDchatFull &update) {
} else {
chat->setUserpicPhoto(MTP_photoEmpty(MTP_long(0)));
}
chat->setInviteLink(update.vexported_invite().match([&](
const MTPDchatInviteExported &data) {
return qs(data.vlink());
}, [&](const MTPDchatInviteEmpty &) {
return QString();
}));
if (const auto invite = update.vexported_invite()) {
invite->match([&](const MTPDchatInviteExported &data) {
chat->setInviteLink(qs(data.vlink()));
});
} else {
chat->setInviteLink(QString());
}
if (const auto pinned = update.vpinned_msg_id()) {
SetTopPinnedMessageId(chat, pinned->v);
}