mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-13 07:55:48 +03:00
Locally check dialog's offset date (#1043)
Telegram ignores the parameter if it's alone.
This commit is contained in:
parent
c51a17bf9a
commit
8c0250f775
|
@ -93,6 +93,13 @@ class DialogMethods(UserMethods):
|
|||
r.dialogs = r.dialogs[:limit]
|
||||
|
||||
for d in r.dialogs:
|
||||
if offset_date:
|
||||
date = getattr(messages.get(
|
||||
d.top_message, None), 'date', None)
|
||||
|
||||
if not date or date.timestamp() > offset_date.timestamp():
|
||||
continue
|
||||
|
||||
peer_id = utils.get_peer_id(d.peer)
|
||||
if peer_id not in seen:
|
||||
seen.add(peer_id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user