mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 05:54:51 +00:00
Accommodate parsing of invited_by attribute of ChatMember (#204)
This commit is contained in:
parent
d6a1503344
commit
a57ee7b333
2 changed files with 4 additions and 2 deletions
|
|
@ -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…
Reference in a new issue