2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +00:00

Merge branch 'develop' into layer-93

This commit is contained in:
Dan 2019-01-24 17:21:57 +01:00
commit 68509638c1
2 changed files with 9 additions and 1 deletions

View File

@ -126,3 +126,6 @@ class BaseClient:
def get_chat_members(self, *args, **kwargs):
pass
def get_chat_members_count(self, *args, **kwargs):
pass

View File

@ -81,9 +81,14 @@ class IterChatMembers(BaseClient):
yielded = set()
queries = [query] if query else QUERIES
total = limit or (1 << 31) - 1
filter = Filters.RECENT if total <= 10000 and filter == Filters.ALL else filter
limit = min(200, total)
filter = (
Filters.RECENT
if self.get_chat_members_count(chat_id) <= 10000 and filter == Filters.ALL
else filter
)
if filter not in QUERYABLE_FILTERS:
queries = [""]