2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +00:00

Parse the pinned message on basic chats too

This commit is contained in:
Dan 2018-12-23 15:37:44 +01:00
parent 2b568afd2a
commit 0ce7498f81

View File

@ -199,11 +199,11 @@ class Chat(PyrogramType):
parsed_chat.can_set_sticker_set = full_chat.can_set_stickers parsed_chat.can_set_sticker_set = full_chat.can_set_stickers
parsed_chat.sticker_set_name = full_chat.stickerset parsed_chat.sticker_set_name = full_chat.stickerset
if full_chat.pinned_msg_id: if full_chat.pinned_msg_id:
parsed_chat.pinned_message = client.get_messages( parsed_chat.pinned_message = client.get_messages(
parsed_chat.id, parsed_chat.id,
message_ids=full_chat.pinned_msg_id message_ids=full_chat.pinned_msg_id
) )
if isinstance(full_chat.exported_invite, types.ChatInviteExported): if isinstance(full_chat.exported_invite, types.ChatInviteExported):
parsed_chat.invite_link = full_chat.exported_invite.link parsed_chat.invite_link = full_chat.exported_invite.link