Skip to content

Commit 8a08dcb

Browse files
committed
Update UserFull according to the new schema
1 parent 439935b commit 8a08dcb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • pyrogram/types/user_and_chats

pyrogram/types/user_and_chats/chat.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,15 @@ def _parse_dialog(client, peer, users: dict, chats: dict):
266266
return Chat._parse_channel_chat(client, chats[peer.channel_id])
267267

268268
@staticmethod
269-
async def _parse_full(client, chat_full: Union[raw.types.messages.ChatFull, raw.types.UserFull]) -> "Chat":
270-
if isinstance(chat_full, raw.types.UserFull):
271-
parsed_chat = Chat._parse_user_chat(client, chat_full.user)
272-
parsed_chat.bio = chat_full.about
269+
async def _parse_full(client, chat_full: Union[raw.types.messages.ChatFull, raw.types.users.UserFull]) -> "Chat":
270+
if isinstance(chat_full, raw.types.users.UserFull):
271+
parsed_chat = Chat._parse_user_chat(client, chat_full.users[0])
272+
parsed_chat.bio = chat_full.full_user.about
273273

274-
if chat_full.pinned_msg_id:
274+
if chat_full.full_user.pinned_msg_id:
275275
parsed_chat.pinned_message = await client.get_messages(
276276
parsed_chat.id,
277-
message_ids=chat_full.pinned_msg_id
277+
message_ids=chat_full.full_user.pinned_msg_id
278278
)
279279
else:
280280
full_chat = chat_full.full_chat

0 commit comments

Comments
 (0)