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

Suggest converting to gigagroup.

This commit is contained in:
John Preston
2021-02-19 17:53:20 +04:00
parent 47d2ecf629
commit 221b896117
9 changed files with 134 additions and 63 deletions

View File

@@ -739,6 +739,16 @@ void ApplyChannelUpdate(
const MTPDchannelFull &update) {
const auto session = &channel->session();
if (channel->isMegagroup()) {
const auto suggestions = update.vpending_suggestions().value_or_empty();
channel->owner().setSuggestToGigagroup(
channel,
ranges::contains(
suggestions,
"convert_to_gigagroup"_q,
&MTPstring::v));
}
channel->setAvailableMinId(update.vavailable_min_id().value_or_empty());
auto canViewAdmins = channel->canViewAdmins();
auto canViewMembers = channel->canViewMembers();