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

Support group-like channels.

This commit is contained in:
John Preston
2024-08-13 13:51:11 +02:00
parent 24a7e48b75
commit 9ea495f59d
17 changed files with 152 additions and 46 deletions

View File

@@ -1268,9 +1268,12 @@ Data::RestrictionCheckResult PeerData::amRestricted(
}
bool PeerData::amAnonymous() const {
return isBroadcast()
|| (isChannel()
&& (asChannel()->adminRights() & ChatAdminRight::Anonymous));
if (const auto channel = asChannel()) {
return channel->isBroadcast()
? !channel->signatureProfiles()
: (channel->adminRights() & ChatAdminRight::Anonymous);
}
return false;
}
bool PeerData::canRevokeFullHistory() const {