Ignore PersistentTimestamp errors

This commit is contained in:
KurimuzonAkuma 2024-08-28 21:09:38 +03:00
parent 5c927d87a3
commit 82bb09c74a

View File

@ -46,7 +46,7 @@ from pyrogram.errors import (
VolumeLocNotFound, ChannelPrivate, VolumeLocNotFound, ChannelPrivate,
BadRequest, AuthBytesInvalid, BadRequest, AuthBytesInvalid,
FloodWait, FloodPremiumWait, FloodWait, FloodPremiumWait,
ChannelInvalid ChannelInvalid, PersistentTimestampInvalid, PersistentTimestampOutdated
) )
from pyrogram.handlers.handler import Handler from pyrogram.handlers.handler import Handler
from pyrogram.methods import Methods from pyrogram.methods import Methods
@ -650,7 +650,7 @@ class Client(Methods):
force=False force=False
) )
) )
except ChannelPrivate: except (ChannelPrivate, PersistentTimestampOutdated, PersistentTimestampInvalid):
pass pass
else: else:
if not isinstance(diff, raw.types.updates.ChannelDifferenceEmpty): if not isinstance(diff, raw.types.updates.ChannelDifferenceEmpty):
@ -727,7 +727,7 @@ class Client(Methods):
qts=0 qts=0
) )
) )
except (ChannelPrivate, ChannelInvalid): except (ChannelPrivate, ChannelInvalid, PersistentTimestampOutdated, PersistentTimestampInvalid):
break break
if isinstance(diff, raw.types.updates.DifferenceEmpty): if isinstance(diff, raw.types.updates.DifferenceEmpty):