From 18da855dd4dc787b7aab08fecf3066bac80790ff Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Tue, 20 Sep 2022 16:17:45 +0200 Subject: [PATCH] Fix get_permissions for small group chats Closes #3811. --- telethon/client/chats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/client/chats.py b/telethon/client/chats.py index dfbeddcc..537ca515 100644 --- a/telethon/client/chats.py +++ b/telethon/client/chats.py @@ -1259,7 +1259,7 @@ class ChatMethods: if isinstance(entity, types.Channel): FullChat = await self(functions.channels.GetFullChannelRequest(entity)) elif isinstance(entity, types.Chat): - FullChat = await self(functions.messages.GetFullChatRequest(entity)) + FullChat = await self(functions.messages.GetFullChatRequest(entity.id)) else: return return FullChat.chats[0].default_banned_rights @@ -1276,7 +1276,7 @@ class ChatMethods: return custom.ParticipantPermissions(participant.participant, False) elif helpers._entity_type(entity) == helpers._EntityType.CHAT: chat = await self(functions.messages.GetFullChatRequest( - entity + entity.chat_id )) if isinstance(user, types.InputPeerSelf): user = await self.get_me(input_peer=True)