Fix add_admins property of custom.ParticipantPermissions (#3132)

Closes #3131.
This commit is contained in:
ZubAnt 2021-08-15 09:01:25 +03:00 committed by GitHub
parent e546ae2f85
commit 45ed6658fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,9 +92,12 @@ class ParticipantPermissions:
Whether the administrator can add new administrators with the same or
less permissions than them.
"""
if not self.is_admin or (self.is_chat and not self.is_creator):
if not self.is_admin:
return False
if self.is_chat:
return self.is_creator
return self.participant.admin_rights.add_admins
ban_users = property(**_admin_prop('ban_users', """