Skip to content

Feature: Add editForumTopic action to Telegram message tool #7746

@phuctm97

Description

@phuctm97

Summary

Add support for editing Telegram forum topic names via the message tool, plus automatic topic naming based on conversation content.

Context

OpenClaw supports Telegram's Threaded Mode (forum topics in private chats), creating separate sessions per topic. However, there's no way to programmatically rename topics — and topics start with generic names instead of reflecting the conversation content.

Proposed Features

1. Manual Topic Editing (message tool action)

Add an editForumTopic action to the Telegram message tool:

{
  action: "editForumTopic",
  channel: "telegram",
  chatId: "1196986586",
  threadId: 91627,
  name: "New Topic Name",
  iconCustomEmojiId: "..." // optional
}

2. Automatic Topic Naming

Similar to how ChatGPT, Claude, and other AI chat interfaces automatically name conversations based on content:

  • After the first few exchanges in a new topic, automatically generate a descriptive name
  • Could be configurable: channels.telegram.autoNameTopics: true | false
  • Option to set naming style/length preferences
  • Should respect rate limits and not rename too frequently

Example flow:

  1. User starts a new topic (default name: "Topic")
  2. After 2-3 message exchanges, agent summarizes the topic
  3. Agent calls editForumTopic to rename it (e.g., "Testing Threaded Mode")

Telegram Bot API Reference

Requirements

  • For private chats with topics: Supported since Bot API 9.3
  • For supergroups: Bot needs admin rights with can_manage_topics

Use Cases

  1. Manual control: Agents rename threads to reflect topic changes mid-conversation
  2. Auto-organization: New threads get meaningful names automatically, improving chat history navigation
  3. Better UX: Mimics the polished experience of ChatGPT/Claude conversation naming

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions