From df96ead0abe0318d71c949407146fd114457c54b Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Tue, 30 Aug 2022 12:06:59 +0200 Subject: [PATCH] Also except ChannelInvalidError during get_diff This change comes from here: https://github.com/tulir/Telethon/commit/2166d913e6e0572e2cb5f40d82e1a1baed1f675d --- telethon/client/updates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/client/updates.py b/telethon/client/updates.py index b19b9136..03a66104 100644 --- a/telethon/client/updates.py +++ b/telethon/client/updates.py @@ -312,7 +312,7 @@ class UpdateMethods: self._mb_entity_cache ) continue - except errors.ChannelPrivateError: + except (errors.ChannelPrivateError, errors.ChannelInvalidError): # Timeout triggered a get difference, but we have been banned in the channel since then. # Because we can no longer fetch updates from this channel, we should stop keeping track # of it entirely.