Skip to content

fix(telegram): pass button styles to inline keyboards - #1175

Open
stickerdaniel wants to merge 1 commit into
vercel:mainfrom
stickerdaniel:fix/telegram-button-style
Open

stickerdaniel wants to merge 1 commit into
vercel:mainfrom
stickerdaniel:fix/telegram-button-style

Conversation

@stickerdaniel

Copy link
Copy Markdown

Summary

On Telegram, Button and LinkButton style is ignored: approve and reject buttons are shown in the same color. Each inline keyboard button is built from text plus callback_data or url, and style is dropped. A style field was added to inline keyboard buttons in Bot API 9.4.

With this change, "primary" and "danger" are sent as Telegram's style and shown in blue and red. For "default", no style is sent, as on Slack.

Test plan

  • I posted a card with a primary button, a danger button and a primary link button through the built adapter, with fetch stubbed. On main, no style is set in the sendMessage keyboard. With this change, each button has its style set.
  • New test in cards.test.ts: red on main, green with this change.
  • I ran pnpm --filter @chat-adapter/telegram test (580 passed) and pnpm validate.
reply_markup.inline_keyboard before and after
// main
[[{ "text": "Approve", "callback_data": "chat:{\"a\":\"approve\"}" },
  { "text": "Reject", "callback_data": "chat:{\"a\":\"reject\"}" },
  { "text": "Logs", "url": "https://example.com" }]]

// this branch
[[{ "text": "Approve", "callback_data": "chat:{\"a\":\"approve\"}", "style": "primary" },
  { "text": "Reject", "callback_data": "chat:{\"a\":\"reject\"}", "style": "danger" },
  { "text": "Logs", "url": "https://example.com", "style": "primary" }]]

Checklist

  • All commits are signed and verified
  • All commits are signed off for the DCO (git commit -s)
  • pnpm validate passes
  • Changeset added (or N/A — see CONTRIBUTING.md)
  • Documentation updated (or N/A)

Implemented with Claude Opus 5.5 (high) and reviewed with GPT-6 (Extra High) in Claude Code via T3 Code.

Signed-off-by: Daniel Sticker <daniel.sticker@rwth-aachen.de>
@stickerdaniel
stickerdaniel requested review from a team and a balanced review from Copilot November 17, 2026 05:36
@vercel

vercel Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@stickerdaniel is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants