mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
Write update state to session only if Client.skip_updates = False
This commit is contained in:
parent
9a7d2ee0bd
commit
ff3d53e142
@ -610,7 +610,7 @@ class Client(Methods):
|
||||
pts = getattr(update, "pts", None)
|
||||
pts_count = getattr(update, "pts_count", None)
|
||||
|
||||
if pts:
|
||||
if pts and not self.skip_updates:
|
||||
await self.storage.update_state(
|
||||
(
|
||||
utils.get_channel_id(channel_id) if channel_id else 0,
|
||||
@ -651,6 +651,7 @@ class Client(Methods):
|
||||
|
||||
self.dispatcher.updates_queue.put_nowait((update, users, chats))
|
||||
elif isinstance(updates, (raw.types.UpdateShortMessage, raw.types.UpdateShortChatMessage)):
|
||||
if not self.skip_updates:
|
||||
await self.storage.update_state(
|
||||
(
|
||||
0,
|
||||
|
Loading…
Reference in New Issue
Block a user