From 1e635f00ea95d10c9b28e7abfc488f1cfaef29cf Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 13 Apr 2019 16:10:15 +0200 Subject: [PATCH] Fix set_chat_description not working anymore with the new Layer --- pyrogram/client/methods/chats/set_chat_description.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pyrogram/client/methods/chats/set_chat_description.py b/pyrogram/client/methods/chats/set_chat_description.py index ebe15bf2..9d4e130b 100644 --- a/pyrogram/client/methods/chats/set_chat_description.py +++ b/pyrogram/client/methods/chats/set_chat_description.py @@ -47,15 +47,13 @@ class SetChatDescription(BaseClient): """ peer = self.resolve_peer(chat_id) - if isinstance(peer, types.InputPeerChannel): + if isinstance(peer, (types.InputPeerChannel, types.InputPeerChat)): self.send( - functions.channels.EditAbout( - channel=peer, + functions.messages.EditChatAbout( + peer=peer, about=description ) ) - elif isinstance(peer, types.InputPeerChat): - raise ValueError("The chat_id \"{}\" belongs to a basic group".format(chat_id)) else: raise ValueError("The chat_id \"{}\" belongs to a user".format(chat_id))