From 30c0086fde9533734f007fc7187b0fa9bf86d6fe Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 3 Nov 2018 22:01:26 +0100 Subject: [PATCH] Fix missing total_count for ChatMembers in channels/supergroups --- pyrogram/client/ext/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/ext/utils.py b/pyrogram/client/ext/utils.py index 696174a7..74b373eb 100644 --- a/pyrogram/client/ext/utils.py +++ b/pyrogram/client/ext/utils.py @@ -973,6 +973,7 @@ def parse_chat_members(members: types.channels.ChannelParticipants or types.mess parsed_members = [] if isinstance(members, types.channels.ChannelParticipants): + count = members.count members = members.participants for member in members: @@ -1031,7 +1032,7 @@ def parse_chat_members(members: types.channels.ChannelParticipants or types.mess parsed_members.append(chat_member) return pyrogram_types.ChatMembers( - total_count=members.count, + total_count=count, chat_members=parsed_members ) else: