2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Accommodate parsing of invited_by attribute of ChatMember (#204)

This commit is contained in:
Dan 2019-01-21 16:33:33 +01:00
parent d6a1503344
commit a57ee7b333
2 changed files with 4 additions and 2 deletions

View File

@ -67,6 +67,8 @@ class GetChatMember(BaseClient):
)
)
return pyrogram.ChatMember._parse(self, r.participant, r.users[0])
users = {i.id: i for i in r.users}
return pyrogram.ChatMember._parse(self, r.participant, users)
else:
raise ValueError("The chat_id \"{}\" belongs to a user".format(chat_id))

View File

@ -59,7 +59,7 @@ class ChatMembers(PyrogramType):
total_count = len(members)
for member in members:
chat_members.append(ChatMember._parse(client, member, users[member.user_id]))
chat_members.append(ChatMember._parse(client, member, users))
return ChatMembers(
total_count=total_count,