mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Fix get_history in chats with less than 100 messages
This commit is contained in:
parent
ad36e1e0d1
commit
5dff2fe604
@ -106,6 +106,6 @@ class GetHistory(BaseClient):
|
|||||||
messages[i].reply_to_message = reply_to_messages[r.messages[i].reply_to_msg_id]
|
messages[i].reply_to_message = reply_to_messages[r.messages[i].reply_to_msg_id]
|
||||||
|
|
||||||
return pyrogram.Messages(
|
return pyrogram.Messages(
|
||||||
total_count=r.count,
|
total_count=getattr(r, "count", len(r.messages)),
|
||||||
messages=messages
|
messages=messages
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user