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:
commit
68509638c1
@ -126,3 +126,6 @@ class BaseClient:
|
||||
|
||||
def get_chat_members(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def get_chat_members_count(self, *args, **kwargs):
|
||||
pass
|
||||
|
@ -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 = [""]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user