mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Hide Add Users checkbox if megagroup is democracy.
Also unite invite_users and invite_link flags.
This commit is contained in:
@@ -864,8 +864,11 @@ public:
|
||||
bool canDeleteMessages() const {
|
||||
return adminRights().is_delete_messages() || amCreator();
|
||||
}
|
||||
bool anyoneCanAddMembers() const {
|
||||
return (flags & MTPDchannel::Flag::f_democracy);
|
||||
}
|
||||
bool canAddMembers() const {
|
||||
return adminRights().is_invite_users() || amCreator() || (amIn() && (flags & MTPDchannel::Flag::f_democracy));
|
||||
return adminRights().is_invite_users() || amCreator() || (anyoneCanAddMembers() && amIn() && !hasRestrictedRights());
|
||||
}
|
||||
bool canAddAdmins() const {
|
||||
return adminRights().is_add_admins() || amCreator();
|
||||
|
Reference in New Issue
Block a user