mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
Fix missing total_count for ChatMembers in channels/supergroups
This commit is contained in:
parent
96af2ebcf2
commit
30c0086fde
@ -973,6 +973,7 @@ def parse_chat_members(members: types.channels.ChannelParticipants or types.mess
|
|||||||
parsed_members = []
|
parsed_members = []
|
||||||
|
|
||||||
if isinstance(members, types.channels.ChannelParticipants):
|
if isinstance(members, types.channels.ChannelParticipants):
|
||||||
|
count = members.count
|
||||||
members = members.participants
|
members = members.participants
|
||||||
|
|
||||||
for member in members:
|
for member in members:
|
||||||
@ -1031,7 +1032,7 @@ def parse_chat_members(members: types.channels.ChannelParticipants or types.mess
|
|||||||
parsed_members.append(chat_member)
|
parsed_members.append(chat_member)
|
||||||
|
|
||||||
return pyrogram_types.ChatMembers(
|
return pyrogram_types.ChatMembers(
|
||||||
total_count=members.count,
|
total_count=count,
|
||||||
chat_members=parsed_members
|
chat_members=parsed_members
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user