Skip to content

Telegram: slash commands return 'not authorized' in forum topic chats #29135

@barronlroth

Description

@barronlroth

Bug

Slash commands (native BotFather commands like /status, /reasoning, etc.) return "You are not authorized to use this command." when run in any Telegram forum (supergroup with topics enabled), including the General topic.

Expected behavior

Slash commands should work in forum topics the same way they work in regular groups and DMs, respecting the group's allowFrom / groupPolicy settings.

Actual behavior

Every slash command in a forum topic returns the authorization error, even for the bot owner / allowlisted user. Regular messages in the same topics work fine (the bot responds normally).

Reproduction

  1. Have a Telegram supergroup with topics enabled (forum mode)
  2. Bot is added and allowlisted in channels.telegram.groups.<chatId>
  3. Send a native slash command (e.g. /status) in any topic, including General
  4. Error: "You are not authorized to use this command."

Likely cause

The CommandTargetSessionKey for native commands may not be resolving the forum topic session key correctly. Forum topics use :topic:<threadId> suffixed session keys, but the command auth check may be looking up the wrong session or missing the topic context entirely.

Environment

  • OpenClaw 2026.2.22-2
  • Telegram channel
  • Forum supergroup with topics enabled
  • macOS (M4 Mac mini)

Metadata

Metadata

Assignees

No one assigned

    Labels

    close:duplicateClosed as duplicatededupe:childDuplicate issue/PR child in dedupe cluster

    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