2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16: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

@@ -777,12 +777,13 @@ void ApplyChannelUpdate(
channel->growSlowmodeLastMessage(
next->v - channel->slowmodeSeconds());
}
channel->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) {
channel->setInviteLink(qs(data.vlink()));
});
} else {
channel->setInviteLink(QString());
}
if (const auto location = update.vlocation()) {
channel->setLocation(*location);
} else {