mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-05 00:35:10 +00:00
Add missing await
This commit is contained in:
@@ -73,4 +73,4 @@ class GetChat(BaseClient):
|
||||
else:
|
||||
r = await self.send(functions.messages.GetFullChat(peer.chat_id))
|
||||
|
||||
return pyrogram.Chat._parse_full(self, r)
|
||||
return await pyrogram.Chat._parse_full(self, r)
|
||||
|
@@ -174,7 +174,7 @@ class Chat(PyrogramType):
|
||||
return Chat._parse_channel_chat(client, chats[peer.channel_id])
|
||||
|
||||
@staticmethod
|
||||
def _parse_full(client, chat_full: types.messages.ChatFull or types.UserFull) -> "Chat":
|
||||
async def _parse_full(client, chat_full: types.messages.ChatFull or types.UserFull) -> "Chat":
|
||||
if isinstance(chat_full, types.UserFull):
|
||||
parsed_chat = Chat._parse_user_chat(client, chat_full.user)
|
||||
parsed_chat.description = chat_full.about
|
||||
@@ -200,7 +200,7 @@ class Chat(PyrogramType):
|
||||
parsed_chat.sticker_set_name = full_chat.stickerset
|
||||
|
||||
if full_chat.pinned_msg_id:
|
||||
parsed_chat.pinned_message = client.get_messages(
|
||||
parsed_chat.pinned_message = await client.get_messages(
|
||||
parsed_chat.id,
|
||||
message_ids=full_chat.pinned_msg_id
|
||||
)
|
||||
|
Reference in New Issue
Block a user