mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-17 18:46:40 +00:00
Merge branch 'LonamiWebs:v1' into main
This commit is contained in:
commit
1317c083ae
@ -203,13 +203,13 @@ class MTProtoState:
|
|||||||
# messages to change server_salt and notifications about invalid time on the client."
|
# messages to change server_salt and notifications about invalid time on the client."
|
||||||
#
|
#
|
||||||
# This means we skip the time check for certain types of messages.
|
# This means we skip the time check for certain types of messages.
|
||||||
if obj.CONSTRUCTOR_ID not in (BadServerSalt.CONSTRUCTOR_ID, BadMsgNotification.CONSTRUCTOR_ID):
|
if obj.CONSTRUCTOR_ID in (BadServerSalt.CONSTRUCTOR_ID, BadMsgNotification.CONSTRUCTOR_ID):
|
||||||
if not self._highest_remote_id and not self.time_offset:
|
if not self._highest_remote_id and not self.time_offset:
|
||||||
# If the first message we receive is a bad notification, take this opportunity
|
# If the first message we receive is a bad notification, take this opportunity
|
||||||
# to adjust the time offset. Assume it will remain stable afterwards. Updating
|
# to adjust the time offset. Assume it will remain stable afterwards. Updating
|
||||||
# the offset unconditionally would make the next checks pointless.
|
# the offset unconditionally would make the next checks pointless.
|
||||||
self.update_time_offset(remote_msg_id)
|
self.update_time_offset(remote_msg_id)
|
||||||
|
else:
|
||||||
remote_msg_time = remote_msg_id >> 32
|
remote_msg_time = remote_msg_id >> 32
|
||||||
time_delta = (now + self.time_offset) - remote_msg_time
|
time_delta = (now + self.time_offset) - remote_msg_time
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user