2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

Support anonymous group admins.

This commit is contained in:
John Preston
2020-09-10 14:19:48 +03:00
parent b8424b1d89
commit 01ab6e6d4d
11 changed files with 102 additions and 67 deletions

View File

@@ -790,6 +790,12 @@ Data::RestrictionCheckResult PeerData::amRestricted(
return Result::Allowed();
}
bool PeerData::amAnonymous() const {
return isBroadcast()
|| (isChannel()
&& (asChannel()->adminRights() & ChatAdminRight::f_anonymous));
}
bool PeerData::canRevokeFullHistory() const {
return isUser()
&& !isSelf()