Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pyrogram/methods/messages/get_chat_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ async def get_chunk(
chat_id: Union[int, str],
limit: int = 0,
offset: int = 0,
min_id: int = 0,
max_id: int = 0,
from_message_id: int = 0,
from_date: datetime = utils.zero_datetime()
):
Expand All @@ -39,8 +41,8 @@ async def get_chunk(
offset_date=utils.datetime_to_timestamp(from_date),
add_offset=offset,
limit=limit,
max_id=0,
min_id=0,
max_id=max_id,
min_id=min_id,
hash=0
),
sleep_threshold=60
Expand All @@ -56,6 +58,8 @@ async def get_chat_history(
limit: int = 0,
offset: int = 0,
offset_id: int = 0,
min_id: int = 0,
max_id: int = 0,
offset_date: datetime = utils.zero_datetime()
) -> Optional[AsyncGenerator["types.Message", None]]:
"""Get messages from a chat history.
Expand Down Expand Up @@ -104,6 +108,8 @@ async def get_chat_history(
limit=limit,
offset=offset,
from_message_id=offset_id,
min_id=min_id,
max_id=max_id,
from_date=offset_date
)

Expand Down