Skip to content

feat(telegram): forum topic support via message_thread_id#1325

Closed
leyten wants to merge 1 commit intoanthropics:mainfrom
leyten:feat/telegram-forum-topic-support
Closed

feat(telegram): forum topic support via message_thread_id#1325
leyten wants to merge 1 commit intoanthropics:mainfrom
leyten:feat/telegram-forum-topic-support

Conversation

@leyten
Copy link
Copy Markdown

@leyten leyten commented Apr 9, 2026

Telegram forum supergroups split conversations into topics. Without message_thread_id, the bot's replies always land in the General feed even when the inbound message came from a sub-topic, which is jarring for users running an MCP-driven Claude in a multi-topic group.

This change:

  • Surfaces the inbound topic on the tag as a message_thread_id attribute (omitted for General / non-forum chats).
  • Adds an optional message_thread_id parameter to the reply tool and threads it through sendMessage / sendPhoto / sendDocument so replies land in the originating topic.
  • Updates the reply tool description and the server instructions block so the model knows to pass message_thread_id back through.

Backwards compatible: regular groups, DMs, and the General topic of a forum group never carry message_thread_id, so existing flows are unchanged.

Telegram forum supergroups split conversations into topics. Without
message_thread_id, the bot's replies always land in the General feed
even when the inbound message came from a sub-topic, which is jarring
for users running an MCP-driven Claude in a multi-topic group.

This change:

- Surfaces the inbound topic on the <channel> tag as a
  message_thread_id attribute (omitted for General / non-forum chats).
- Adds an optional message_thread_id parameter to the reply tool and
  threads it through sendMessage / sendPhoto / sendDocument so replies
  land in the originating topic.
- Updates the reply tool description and the server instructions block
  so the model knows to pass message_thread_id back through.

Backwards compatible: regular groups, DMs, and the General topic of a
forum group never carry message_thread_id, so existing flows are
unchanged.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin here.

@github-actions github-actions bot closed this Apr 9, 2026
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.

1 participant