mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-04-20 17:11:59 +03:00
Fix telethon not saving update state outside of disconnect. Fixes catch up
This commit is contained in:
parent
516a2e7435
commit
9bfc49e405
|
@ -467,6 +467,9 @@ class UpdateMethods:
|
|||
# inserted because this is a rather expensive operation
|
||||
# (default's sqlite3 takes ~0.1s to commit changes). Do
|
||||
# it every minute instead. No-op if there's nothing new.
|
||||
|
||||
ss, cs = self._message_box.session_state()
|
||||
self.session.set_update_state(0, types.updates.State(**ss, unread_count=0))
|
||||
self.session.save()
|
||||
|
||||
async def _dispatch_update(self: 'TelegramClient', update):
|
||||
|
|
Loading…
Reference in New Issue
Block a user