Ignore PersistentTimestamp errors

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
KurimuzonAkuma 2024-08-28 21:09:38 +03:00 committed by wulan17
parent ee8f11e2a0
commit 4e2d553f35
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5

View file

@ -45,7 +45,7 @@ from pyrogram.errors import CDNFileHashMismatch
from pyrogram.errors import ( from pyrogram.errors import (
SessionPasswordNeeded, SessionPasswordNeeded,
VolumeLocNotFound, ChannelPrivate, VolumeLocNotFound, ChannelPrivate,
BadRequest, ChannelInvalid BadRequest, 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
@ -666,7 +666,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):
@ -742,7 +742,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):