mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Call catch_up on reconnect (WIP for #1125)
This commit is contained in:
@@ -378,8 +378,8 @@ class AuthMethods(MessageParseMethods, UserMethods):
|
||||
# By setting state.pts = 1 after logging in, the user or bot can
|
||||
# `catch_up` on all updates (and obtain necessary access hashes)
|
||||
# if they desire. The date parameter is ignored when pts = 1.
|
||||
self._state.pts = 1
|
||||
self._state.date = datetime.datetime.now(tz=datetime.timezone.utc)
|
||||
self._old_state = types.updates.State(
|
||||
1, 0, datetime.datetime.now(tz=datetime.timezone.utc), 0, 0)
|
||||
|
||||
return user
|
||||
|
||||
@@ -437,8 +437,8 @@ class AuthMethods(MessageParseMethods, UserMethods):
|
||||
self._bot = None
|
||||
self._self_input_peer = None
|
||||
self._authorized = False
|
||||
self._state = types.updates.State(
|
||||
0, 0, datetime.datetime.now(tz=datetime.timezone.utc), 0, 0)
|
||||
self._old_state = None
|
||||
self._new_state = None
|
||||
|
||||
await self.disconnect()
|
||||
self.session.delete()
|
||||
|
Reference in New Issue
Block a user