mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-17 10:36:37 +00:00
Allow edit_admin on yourself (#1285)
This commit is contained in:
parent
07b0583069
commit
72dd36bc17
@ -864,10 +864,7 @@ class ChatMethods:
|
|||||||
"""
|
"""
|
||||||
entity = await self.get_input_entity(entity)
|
entity = await self.get_input_entity(entity)
|
||||||
user = await self.get_input_entity(user)
|
user = await self.get_input_entity(user)
|
||||||
if isinstance(user, types.InputPeerSelf):
|
if not isinstance(user, (types.InputPeerUser, types.InputPeerSelf)):
|
||||||
raise ValueError('You cannot admin yourself')
|
|
||||||
|
|
||||||
if not isinstance(user, types.InputPeerUser):
|
|
||||||
raise ValueError('You must pass a user entity')
|
raise ValueError('You must pass a user entity')
|
||||||
|
|
||||||
perm_names = (
|
perm_names = (
|
||||||
|
Loading…
Reference in New Issue
Block a user