From d72754be1ede4b7c1ffd88a5e1908f634230fff9 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 17 Jan 2019 12:30:40 +0100 Subject: [PATCH] Add missing await --- pyrogram/client/methods/chats/get_chat.py | 2 +- pyrogram/client/types/user_and_chats/chat.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyrogram/client/methods/chats/get_chat.py b/pyrogram/client/methods/chats/get_chat.py index c868acb5..422cc34d 100644 --- a/pyrogram/client/methods/chats/get_chat.py +++ b/pyrogram/client/methods/chats/get_chat.py @@ -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) diff --git a/pyrogram/client/types/user_and_chats/chat.py b/pyrogram/client/types/user_and_chats/chat.py index ec30b866..de1cd633 100644 --- a/pyrogram/client/types/user_and_chats/chat.py +++ b/pyrogram/client/types/user_and_chats/chat.py @@ -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 )