From d2af7c62af7b9c3a24a5219a35e9beecdb830f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Mon, 28 Aug 2023 22:46:13 +0200 Subject: [PATCH] chore: bump version --- config/version.txt | 2 +- handlers/message.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/version.txt b/config/version.txt index 99eba4d..2582ddd 100644 --- a/config/version.txt +++ b/config/version.txt @@ -1 +1 @@ -4.1.0 \ No newline at end of file +4.1.1 \ No newline at end of file diff --git a/handlers/message.go b/handlers/message.go index fc5e6f5..9f44c7a 100644 --- a/handlers/message.go +++ b/handlers/message.go @@ -83,10 +83,10 @@ func (h *MessageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } else if err := resolver.Resolve(recipientId, m, &p); err != nil { statusCode := parseStatusCode(err, http.StatusInternalServerError) - if statusCode == 403 { + if statusCode == http.StatusForbidden { // user has probably blocked the bot -> invalidate token h.userService.InvalidateToken(token) - log.Printf("invalidating token '%s' for chat '%s', because got 403 from telegram", token, recipientId) + log.Printf("invalidating token '%s' for chat '%s', because got 403 from telegram\n", token, recipientId) err = errors.New("error: got 403 from telegram, invalidating your token, text the bot to generate a new one") }