From 0ce7498f810af9ddabfa96ed491f2f4751815106 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 23 Dec 2018 15:37:44 +0100 Subject: [PATCH] Parse the pinned message on basic chats too --- pyrogram/client/types/user_and_chats/chat.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyrogram/client/types/user_and_chats/chat.py b/pyrogram/client/types/user_and_chats/chat.py index 5b5a54a8..7b4240dd 100644 --- a/pyrogram/client/types/user_and_chats/chat.py +++ b/pyrogram/client/types/user_and_chats/chat.py @@ -199,11 +199,11 @@ class Chat(PyrogramType): parsed_chat.can_set_sticker_set = full_chat.can_set_stickers parsed_chat.sticker_set_name = full_chat.stickerset - if full_chat.pinned_msg_id: - parsed_chat.pinned_message = client.get_messages( - parsed_chat.id, - message_ids=full_chat.pinned_msg_id - ) + if full_chat.pinned_msg_id: + parsed_chat.pinned_message = client.get_messages( + parsed_chat.id, + message_ids=full_chat.pinned_msg_id + ) if isinstance(full_chat.exported_invite, types.ChatInviteExported): parsed_chat.invite_link = full_chat.exported_invite.link