From b0161bd2d4515289711b0c961f35b0f6af27c7b3 Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Fri, 29 Nov 2024 11:42:19 +0300 Subject: [PATCH] feat(telegram): mark AUTH_KEY_DUPLICATED as permanent --- telegram/connect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/connect.go b/telegram/connect.go index 92ec227ce..84f77d5e5 100644 --- a/telegram/connect.go +++ b/telegram/connect.go @@ -65,7 +65,7 @@ func (c *Client) isPermanentError(err error) bool { if errors.Is(err, exchange.ErrKeyFingerprintNotFound) { return true } - if tgerr.Is(err, "AUTH_KEY_UNREGISTERED", "SESSION_EXPIRED") { + if tgerr.Is(err, "AUTH_KEY_UNREGISTERED", "SESSION_EXPIRED", "AUTH_KEY_DUPLICATED") { return true } if auth.IsUnauthorized(err) {