From 73d9af51efe10e86dc35f579d4ec79eac99f3ae2 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 20 Feb 2020 13:54:51 +0100 Subject: [PATCH] Don't use the "recent" filter when passing a query argument --- pyrogram/client/methods/chats/iter_chat_members.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 )