mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 02:43:45 +03:00
Fix add_admins property of custom.ParticipantPermissions (#3132)
Closes #3131.
This commit is contained in:
parent
e546ae2f85
commit
45ed6658fe
|
@ -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', """
|
||||
|
|
Loading…
Reference in New Issue
Block a user