diff --git a/pyrogram/client/methods/chats/iter_chat_members.py b/pyrogram/client/methods/chats/iter_chat_members.py index ba621d3e..aaa7ab06 100644 --- a/pyrogram/client/methods/chats/iter_chat_members.py +++ b/pyrogram/client/methods/chats/iter_chat_members.py @@ -101,7 +101,9 @@ class IterChatMembers(BaseClient): filter = ( Filters.RECENT - if self.get_chat_members_count(chat_id) <= 10000 and filter == Filters.ALL + if (not query + and filter == Filters.ALL + and self.get_chat_members_count(chat_id) <= 10000) else filter )