mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Fix bad notification due to wrong system clock never ending
This commit is contained in:
@@ -49,6 +49,13 @@ class MTProtoState:
|
||||
after_id=after.msg_id if after else None
|
||||
)
|
||||
|
||||
def update_message_id(self, message):
|
||||
"""
|
||||
Updates the message ID to a new one,
|
||||
used when the time offset changed.
|
||||
"""
|
||||
message.msg_id = self._get_new_msg_id()
|
||||
|
||||
@staticmethod
|
||||
def _calc_key(auth_key, msg_key, client):
|
||||
"""
|
||||
@@ -153,6 +160,7 @@ class MTProtoState:
|
||||
correct = correct_msg_id >> 32
|
||||
self.time_offset = correct - now
|
||||
self._last_msg_id = 0
|
||||
return self.time_offset
|
||||
|
||||
def _get_seq_no(self, content_related):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user