-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Feature: Support Telegram Topics/Forum threads in DMs and Groups
Problem
When a Telegram bot has Topics enabled (via BotFather), messages from topic threads don't include message_thread_id in the agent's message envelope. This means:
- Agent can't tell which topic a message came from
- Agent can't route replies back to the correct topic (they land in General)
Current behavior
- Inbound messages show only
message_id, no thread context messagetool acceptsthreadIdparam but agent has no way to know what value to use
Expected behavior
- Inbound envelope should include
threadIdormessage_thread_idwhen present - Replies should auto-target the originating thread (like
replyToModedoes for message replies)
Context
- Works for both DM-with-Topics and Group Forums
- BotFather setting: "Topics in Groups" / bot added to forum-enabled group or DM
- Telegram API provides
message_thread_idin updates
Suggested implementation
- Parse
message_thread_idfrom Telegram Update - Add to envelope metadata (e.g.,
[threadId: 123]) - Store in session context for reply routing
- Use for outbound
sendMessagecalls automatically
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request