mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Attempt at fixing msg_id too low/high (#95)
This commit is contained in:
@@ -65,3 +65,9 @@ class Session:
|
||||
|
||||
self.last_message_id = new_msg_id
|
||||
return new_msg_id
|
||||
|
||||
def update_time_offset(self, correct_msg_id):
|
||||
"""Updates the time offset based on a known correct message ID"""
|
||||
now = int(time.time())
|
||||
correct = correct_msg_id >> 32
|
||||
self.time_offset = correct - now
|
||||
|
Reference in New Issue
Block a user