2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-25 11:28:05 +00:00

Fix set_chat_description not working anymore with the new Layer

This commit is contained in:
Dan 2019-04-13 16:10:15 +02:00
parent 0d5724164c
commit 1e635f00ea

View File

@ -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))