mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 15:14:52 +00:00
Fetch the pinned message in own chat (saved messages)
This commit is contained in:
parent
4661fb035b
commit
22a7e338ff
1 changed files with 6 additions and 0 deletions
|
|
@ -185,6 +185,12 @@ class Chat(PyrogramType):
|
||||||
if isinstance(chat_full, types.UserFull):
|
if isinstance(chat_full, types.UserFull):
|
||||||
parsed_chat = Chat._parse_user_chat(client, chat_full.user)
|
parsed_chat = Chat._parse_user_chat(client, chat_full.user)
|
||||||
parsed_chat.description = chat_full.about
|
parsed_chat.description = chat_full.about
|
||||||
|
|
||||||
|
if chat_full.pinned_msg_id:
|
||||||
|
parsed_chat.pinned_message = client.get_messages(
|
||||||
|
parsed_chat.id,
|
||||||
|
message_ids=chat_full.pinned_msg_id
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
full_chat = chat_full.full_chat
|
full_chat = chat_full.full_chat
|
||||||
chat = None
|
chat = None
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue