mirror of
https://github.com/pyrogram/pyrogram
synced 2025-10-03 13:26:07 +00:00
Accommodate parsing of invited_by attribute of ChatMember (#204)
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user