Repository navigation
Conversation
When a Telegram bot is connected through an incoming webhook (?telegram_bot_id=), inline button clicks are passed to the bot as callback_query, but answerCallbackQuery is never called. Telegram then keeps the button in a loading state until it times out. Listen to chat.webhook_incoming and answer the callback query right away with a short curl timeout so webhook processing is not delayed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Won't accept that can be done via bot builder itself. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a Telegram bot is connected through an incoming webhook (
/webhooks/incoming/...?telegram_bot_id=N), inline button clicks reach LHC ascallback_queryand are processed by the bot, butanswerCallbackQueryis never called. Telegram keeps the pressed button in a loading state until its own timeout, so the bot looks frozen even though it already replied.The legacy
/telegram/callback/Nflow (CallbackqueryCommand) already answers callback queries; only the incoming webhook flow was missing it.Change
chat.webhook_incomingin the extension bootstrap.telegramscope webhooks withcallback_query.idandtelegram_bot_id, callanswerCallbackQueryimmediately with a short curl timeout (2 s connect / 3 s total), so webhook processing is not delayed.Testing
Deployed on our production instance with an incoming-webhook Telegram bot and bot trigger quick replies (inline buttons).
🤖 Generated with Claude Code