2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Show admins in participants_hidden group info.

This commit is contained in:
John Preston
2022-12-23 17:13:32 +04:00
parent d6c188d642
commit ce40ecc7f9
17 changed files with 154 additions and 91 deletions

View File

@@ -879,7 +879,9 @@ not_null<HistoryItem*> History::addNewToBack(
if (auto chat = peer->asChat()) {
return &chat->lastAuthors;
} else if (auto channel = peer->asMegagroup()) {
return &channel->mgInfo->lastParticipants;
return channel->canViewMembers()
? &channel->mgInfo->lastParticipants
: nullptr;
}
return nullptr;
};
@@ -998,7 +1000,8 @@ void History::applyServiceChanges(
not_null<ChannelData*> megagroup,
not_null<MegagroupInfo*> mgInfo,
not_null<UserData*> user) {
if (!base::contains(mgInfo->lastParticipants, user)) {
if (!base::contains(mgInfo->lastParticipants, user)
&& megagroup->canViewMembers()) {
mgInfo->lastParticipants.push_front(user);
session().changes().peerUpdated(
peer,