mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix date empty when getting difference
This commit is contained in:
parent
7ce0b2f940
commit
7325718f0e
|
@ -175,7 +175,7 @@ class MessageBox:
|
|||
map: dict = _sentinel, # entry -> state
|
||||
|
||||
# Additional fields beyond PTS needed by `ENTRY_ACCOUNT`.
|
||||
date: datetime.datetime = epoch(),
|
||||
date: datetime.datetime = epoch() + datetime.timedelta(seconds=1),
|
||||
seq: int = NO_SEQ,
|
||||
|
||||
# Holds the entry with the closest deadline (optimization to avoid recalculating the minimum deadline).
|
||||
|
@ -478,7 +478,8 @@ class MessageBox:
|
|||
if any_pts_applied[0]:
|
||||
if __debug__:
|
||||
self._trace('Updating seq as local pts was updated too')
|
||||
self.date = date
|
||||
if date != epoch():
|
||||
self.date = date
|
||||
if seq != NO_SEQ:
|
||||
self.seq = seq
|
||||
|
||||
|
@ -689,7 +690,7 @@ class MessageBox:
|
|||
updates=diff.other_updates,
|
||||
users=diff.users,
|
||||
chats=diff.chats,
|
||||
date=epoch() + datetime.timedelta(seconds=1),
|
||||
date=epoch(),
|
||||
seq=NO_SEQ, # this way date is not used
|
||||
), chat_hashes, updates)
|
||||
|
||||
|
@ -798,7 +799,7 @@ class MessageBox:
|
|||
updates=diff.other_updates,
|
||||
users=diff.users,
|
||||
chats=diff.chats,
|
||||
date=epoch() + datetime.timedelta(seconds=1),
|
||||
date=epoch(),
|
||||
seq=NO_SEQ, # this way date is not used
|
||||
), chat_hashes, updates)
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Versions should comply with PEP440.
|
||||
# This line is parsed in setup.py:
|
||||
__version__ = '1.30.2'
|
||||
__version__ = '1.30.3'
|
||||
|
|
Loading…
Reference in New Issue
Block a user