diff --git a/internal/web/service/tgbot/tgbot_router.go b/internal/web/service/tgbot/tgbot_router.go index 63407e499..66509bcf5 100644 --- a/internal/web/service/tgbot/tgbot_router.go +++ b/internal/web/service/tgbot/tgbot_router.go @@ -1318,6 +1318,9 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool default: action, email, ok := splitClientLinkCallback(callbackQuery.Data) if !ok { + // Nothing matched: an unknown button still has to be answered, or it + // keeps spinning until Telegram times the callback out. + t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.answers.errorOperation")) return } // The keyboard outlives the chat it was sent to, so the email in it @@ -1334,10 +1337,6 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool case "client_qr_links": t.sendClientQRLinks(chatId, email) } - - // Nothing matched: an unknown button still has to be answered, or it - // keeps spinning until Telegram times the callback out. - t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.answers.errorOperation")) } }