Problem
When OpenClaw receives messages from a Telegram forum group (supergroup with topics enabled), the inbound message metadata only includes topic_id (the internal Telegram thread ID), but not the topic name.
This is because the Telegram Bot API does not include the topic name in the Message object - it only provides message_thread_id. The topic name requires a separate API call (getForumTopicInfo) to retrieve.
Expected Behavior
The inbound message metadata should include topic_name alongside topic_id, so the agent can identify which topic a message came from in a human-readable way.
Suggested Solution
When OpenClaw receives a message with a message_thread_id, it could:
- Call
getForumTopicInfo to fetch the topic name
- Cache the result (topic names rarely change)
- Include
topic_name in the metadata passed to the agent
Context
Currently, a user's topic named "topic2" appears only as topic_id: 12 in the metadata, with no way for the agent to know the human-readable name without additional API calls.
Problem
When OpenClaw receives messages from a Telegram forum group (supergroup with topics enabled), the inbound message metadata only includes
topic_id(the internal Telegram thread ID), but not the topic name.This is because the Telegram Bot API does not include the topic name in the
Messageobject - it only providesmessage_thread_id. The topic name requires a separate API call (getForumTopicInfo) to retrieve.Expected Behavior
The inbound message metadata should include
topic_namealongsidetopic_id, so the agent can identify which topic a message came from in a human-readable way.Suggested Solution
When OpenClaw receives a message with a
message_thread_id, it could:getForumTopicInfoto fetch the topic nametopic_namein the metadata passed to the agentContext
Currently, a user's topic named "topic2" appears only as
topic_id: 12in the metadata, with no way for the agent to know the human-readable name without additional API calls.