From 2db8256276e984b49a823ad19b7a02ff8d6d2642 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 14 Mar 2021 12:30:57 +0100 Subject: [PATCH] Update offset by the amount of messages retrieved --- pyrogram/methods/messages/search_messages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/methods/messages/search_messages.py b/pyrogram/methods/messages/search_messages.py index 03b266c3..f8d0cb33 100644 --- a/pyrogram/methods/messages/search_messages.py +++ b/pyrogram/methods/messages/search_messages.py @@ -181,7 +181,7 @@ class SearchMessages(Scaffold): if not messages: return - offset += 100 + offset += len(messages) for message in messages: yield message