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:
parent
d6a1503344
commit
a57ee7b333
@ -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))
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user