mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-04-21 01:21:59 +03:00
Prefer session qts if session qts is higher than getState qts
This commit is contained in:
parent
0fc9b14674
commit
6fe3035122
|
@ -392,6 +392,17 @@ class AuthMethods:
|
|||
self._authorized = True
|
||||
|
||||
state = await self(functions.updates.GetStateRequest())
|
||||
session_state = self.session.get_update_state(0)
|
||||
|
||||
if session_state and session_state.qts > state.qts:
|
||||
if __debug__:
|
||||
self._message_box._trace(
|
||||
'Local session qts higher than getState qts, using local, local qts = %r, getState qts = %r',
|
||||
session_state.qts, state.qts
|
||||
)
|
||||
|
||||
state.qts = session_state.qts
|
||||
|
||||
self._message_box.load(SessionState(0, 0, 0, state.pts, state.qts, int(state.date.timestamp()), state.seq, 0), [])
|
||||
|
||||
return user
|
||||
|
|
Loading…
Reference in New Issue
Block a user