From 83a2094b3b57e11e7fb699f6422ba503f5c295cb Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Fri, 23 Feb 2018 21:18:35 +0100 Subject: [PATCH] things --- telethon/telegram_client.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index b2056665..3e7918d2 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -1051,13 +1051,11 @@ class TelegramClient(TelegramBareClient): offset += len(participants.users) if offset > limit: break + users = UserList(all_participants.values()) - if limit <= 200: - users.total = \ - self(GetFullChannelRequest(entity)).full_chat.participants_count - else: - # Returns incorrect amount unless limit > 200 - users.total = participants.count + users.total = self(GetFullChannelRequest( + entity)).full_chat.participants_count + elif isinstance(entity, InputPeerChat): users = self(GetFullChatRequest(entity.chat_id)).users if len(users) > limit: