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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user