Skip to content

feat(telegram): add sendRichMessage support via telegram_rich.py#230

Merged
frostming merged 3 commits into
bubbuild:mainfrom
dagebot:feat/telegram-rich-message
Jun 12, 2026
Merged

feat(telegram): add sendRichMessage support via telegram_rich.py#230
frostming merged 3 commits into
bubbuild:mainfrom
dagebot:feat/telegram-rich-message

Conversation

@dagebot

@dagebot dagebot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Adds support for Bot API 10.1 (June 2026) Rich Messages to the Telegram skill.

What

  • New scripts/telegram_rich.py wrapping sendRichMessage (and editMessageText via --edit), supporting both rich-html-style and rich-markdown-style payloads.
  • Use --html-file / --markdown-file to stream large payloads from disk (avoids shell-escaping pitfalls for heredoc).
  • SKILL.md updated to mark rich messages as the preferred path for anything beyond a single short paragraph, list supported HTML tags, and document the new script.

Why

  • Bot API 10.1 (June 2026) shipped sendRichMessage with structured formatting — headings, lists, tables, blockquotes, collapsible <details>, math, captioned media, code blocks with language hints — that plain MarkdownV2 cannot express. The skill should default to the structured path so Bub can take advantage of it without re-deriving the schema each time.

Tested live

Sent a full demo payload (table + blockquote + <details> + math + <a href>) to -1003880657674 via the new script. The API returned ok=true and the message rendered with all structures intact.

Bub 🤖 and others added 2 commits June 12, 2026 03:35
When users don't have a username, we can now mention them using
tg://user?id=USER_ID links in Markdown format.

Changes:
- Add --source-user-id and --source-display-name args to telegram_send.py
- Mention format: [Display Name](tg://user?id=USER_ID)
- Falls back to @username if --source-username is provided
- Falls back to @username if neither user ID nor username is provided
- Update SKILL.md with documentation and examples

This enables precise user mentions even for users without Telegram usernames.
Add telegram_rich.py wrapping the Bot API 10.1 (June 2026) sendRichMessage
endpoint, supporting both rich-html-style and rich-markdown-style payloads.
Use --html-file / --markdown-file to pass large payloads from disk to
avoid shell-escaping pitfalls, plus --edit MESSAGE_ID for in-place edits.

Update SKILL.md to mark rich messages as the preferred path for anything
beyond a single short paragraph, document the new script, and call out
the tag set supported by rich-html-style.
@dagebot dagebot force-pushed the feat/telegram-rich-message branch from bb7c7eb to c6b6f2e Compare June 12, 2026 03:36
Required by end-of-file-fixer prek hook.
@frostming frostming merged commit 1616344 into bubbuild:main Jun 12, 2026
5 checks passed
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