← Back to PRs

#11920: Telegram: create forum topics via message tool (thread-create)

by larsderidder open 2026-02-08 14:58 View on GitHub →
docs channel: telegram agents stale
Closes #10427 What - Add Telegram support for creating forum topics via the message tool using the existing `thread-create` action (calls Bot API `createForumTopic`). - Expose optional topic icon params (`iconColor`, `iconCustomEmojiId`). - Add `channels.telegram.actions.createTopic` gate (default enabled). - Document usage in docs. Why - Sending to `threadId` only routes to existing topics; this enables programmatic creation of new topics in forum supergroups. Testing - Manual: created a topic in a forum-enabled supergroup and sent messages into the returned thread id. - Unit: added coverage for Telegram action handling and message action adapter mapping. AI-assisted - This PR was AI-assisted (Codex). <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> Adds Telegram support for creating forum topics via the message tool by mapping the existing `thread-create` action to a new Telegram tool action `createForumTopic` (Bot API `createForumTopic`). Adds optional topic icon parameters (`iconColor`, `iconCustomEmojiId`), a new action gate `channels.telegram.actions.createTopic` (default enabled), and updates docs plus unit tests to cover the new mapping and handler. <h3>Confidence Score: 4/5</h3> - This PR looks safe to merge; changes are additive and covered by unit tests, but CI should verify since tests couldn't be run locally in this environment. - Reviewed the full diff: implementation routes `thread-create` to Telegram Bot API `createForumTopic`, adds config schema/types and docs updates, and includes unit tests for both the action handler and adapter mapping. No obvious runtime/type errors or unsafe behavior were introduced. Local test execution wasn't possible here (tooling missing), so confidence is slightly reduced pending CI. - src/telegram/send.ts; src/agents/tools/telegram-actions.ts; src/channels/plugins/actions/telegram.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs