mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 20:50:22 +03:00
things
This commit is contained in:
parent
dfd25186cd
commit
83a2094b3b
|
@ -1051,13 +1051,11 @@ class TelegramClient(TelegramBareClient):
|
||||||
offset += len(participants.users)
|
offset += len(participants.users)
|
||||||
if offset > limit:
|
if offset > limit:
|
||||||
break
|
break
|
||||||
|
|
||||||
users = UserList(all_participants.values())
|
users = UserList(all_participants.values())
|
||||||
if limit <= 200:
|
users.total = self(GetFullChannelRequest(
|
||||||
users.total = \
|
entity)).full_chat.participants_count
|
||||||
self(GetFullChannelRequest(entity)).full_chat.participants_count
|
|
||||||
else:
|
|
||||||
# Returns incorrect amount unless limit > 200
|
|
||||||
users.total = participants.count
|
|
||||||
elif isinstance(entity, InputPeerChat):
|
elif isinstance(entity, InputPeerChat):
|
||||||
users = self(GetFullChatRequest(entity.chat_id)).users
|
users = self(GetFullChatRequest(entity.chat_id)).users
|
||||||
if len(users) > limit:
|
if len(users) > limit:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user