From 74ecd2bb33b1cf316b5dc11dd08440e3e09d8118 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 17 Aug 2019 22:22:28 +0200 Subject: [PATCH] Add missing members_count attribute when parsing chats --- pyrogram/client/types/user_and_chats/chat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/types/user_and_chats/chat.py b/pyrogram/client/types/user_and_chats/chat.py index b32dc3e7..f6e938df 100644 --- a/pyrogram/client/types/user_and_chats/chat.py +++ b/pyrogram/client/types/user_and_chats/chat.py @@ -170,6 +170,7 @@ class Chat(Object): title=chat.title, photo=ChatPhoto._parse(client, getattr(chat, "photo", None), peer_id), permissions=ChatPermissions._parse(getattr(chat, "default_banned_rights", None)), + members_count=getattr(chat, "participants_count", None), client=client ) @@ -188,6 +189,7 @@ class Chat(Object): photo=ChatPhoto._parse(client, getattr(channel, "photo", None), peer_id), restriction_reason=getattr(channel, "restriction_reason", None), permissions=ChatPermissions._parse(getattr(channel, "default_banned_rights", None)), + members_count=getattr(channel, "participants_count", None), client=client ) @@ -715,7 +717,6 @@ class Chat(Object): return self._client.leave_chat(self.id) - def export_invite_link(self): """Bound method *export_invite_link* of :obj:`Chat`.