mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Revert add_admins property logic since it differs from the rest
This commit is contained in:
parent
d2756cf68f
commit
5722ba8306
|
@ -79,6 +79,17 @@ class ParticipantPermissions:
|
|||
"""
|
||||
return isinstance(self.participant, types.ChannelParticipantBanned)
|
||||
|
||||
@property
|
||||
def add_admins(self):
|
||||
"""
|
||||
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):
|
||||
return False
|
||||
|
||||
return self.participant.admin_rights.add_admins
|
||||
|
||||
ban_users = property(**_admin_prop('ban_users', """
|
||||
Whether the administrator can ban other users or not.
|
||||
"""))
|
||||
|
@ -87,11 +98,6 @@ class ParticipantPermissions:
|
|||
Whether the administrator can pin messages or not.
|
||||
"""))
|
||||
|
||||
add_admins = property(**_admin_prop('add_admins', """
|
||||
Whether the administrator can add new administrators with the same or
|
||||
less permissions than them.
|
||||
"""))
|
||||
|
||||
invite_users = property(**_admin_prop('invite_users', """
|
||||
Whether the administrator can add new users to the chat.
|
||||
"""))
|
||||
|
|
Loading…
Reference in New Issue
Block a user