openclaw - 💡(How to fix) Fix Telegram: inline button taps arrive as text messages instead of callback_query events [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63282Fetched 2026-04-09 07:55:55
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Participants
Timeline (top)
subscribed ×1

Root Cause

The Telegram plugin configures allowed_update_types to include callback_query, but no callback_query handler is registered in the bot middleware. The button tap reaches Telegram, times out after ~30s, then Telegram sends the callback_data as a plain text message to the bot.

Code Example

{
  "channels": {
    "telegram": {
      "enabled": true,
      "capabilities": {
        "inlineButtons": "allowlist"
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Problem

When using inline keyboard buttons with callback_data in Telegram, tapping the button does not trigger a callback_query event. Instead, Telegram appears to fall back to sending the callback_data as a plain text message after ~30 seconds.

This means button taps arrive in the agent as regular text messages rather than as structured callback events.

Expected behaviour

Tapping an inline button should deliver a callback_query event to the bot immediately, allowing the agent to handle it as a structured callback with the callback_data intact.

Environment

  • OpenClaw version: 2026.4.5 (linux)
  • Telegram bot
  • Config: channels.telegram.capabilities.inlineButtons: allowlist

Configuration

{
  "channels": {
    "telegram": {
      "enabled": true,
      "capabilities": {
        "inlineButtons": "allowlist"
      }
    }
  }
}

Analysis

The Telegram plugin configures allowed_update_types to include callback_query, but no callback_query handler is registered in the bot middleware. The button tap reaches Telegram, times out after ~30s, then Telegram sends the callback_data as a plain text message to the bot.

Impact

Any workflow relying on inline button callbacks (e.g. approve/deny buttons) is broken.

extent analysis

TL;DR

Registering a callback_query handler in the bot middleware is likely to fix the issue with inline button taps not triggering callback_query events.

Guidance

  • Verify that the allowed_update_types in the Telegram plugin configuration includes callback_query to ensure the bot is set up to receive these events.
  • Register a callback_query handler in the bot middleware to process the callback_query events when they are received.
  • Check the Telegram bot configuration to ensure it is correctly set up to send callback_query events to the bot.
  • Test the inline buttons with a simple callback_query handler to confirm the events are being received and processed correctly.

Example

// Example callback_query handler registration
{
  "middleware": [
    {
      "type": "callback_query_handler",
      "handler": "callbackQueryHandlerFunction"
    }
  ]
}

Notes

The provided configuration and analysis suggest that the issue is due to the lack of a callback_query handler in the bot middleware. However, without more information about the specific middleware and handler registration process, the exact steps to register the handler may vary.

Recommendation

Apply workaround: Register a callback_query handler in the bot middleware, as this is the most direct way to address the issue and ensure that inline button taps trigger callback_query events as expected.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING