From fbc18cace0948b48c1569792cf8596d0ea45ec53 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 4 Jan 2019 15:36:43 +0100 Subject: [PATCH] Update get_history docstrings --- pyrogram/client/methods/messages/get_history.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyrogram/client/methods/messages/get_history.py b/pyrogram/client/methods/messages/get_history.py index 14af0110..d45623f4 100644 --- a/pyrogram/client/methods/messages/get_history.py +++ b/pyrogram/client/methods/messages/get_history.py @@ -31,9 +31,10 @@ class GetHistory(BaseClient): offset_id: int = 0, offset_date: int = 0, reverse: bool = False): - """Use this method to retrieve the history of a chat. + """Use this method to retrieve a chunk of the history of a chat. You can get up to 100 messages at once. + For a more convenient way of getting a chat history see :meth:`iter_history`. Args: chat_id (``int`` | ``str``): @@ -72,7 +73,7 @@ class GetHistory(BaseClient): peer=self.resolve_peer(chat_id), offset_id=offset_id, offset_date=offset_date, - add_offset=offset - (limit if reverse else 0), + add_offset=offset * (-1 if reverse else 1) - (limit if reverse else 0), limit=limit, max_id=0, min_id=0,