Skip to content

fix(telegram): Pairing auto-reply ignores forum topic context #8820

@nezovskii

Description

@nezovskii

Bug Description

When a new user sends a message in a Telegram forum topic (supergroup with topics enabled), the pairing auto-reply is sent to the General channel instead of the original topic.

Steps to Reproduce

  1. Configure a Telegram group with topics in channels.telegram.groups with requireMention: false
  2. Have dmPolicy: "pairing" enabled
  3. A new (not yet approved) user sends a message in a specific topic (e.g., topic:515)
  4. The pairing request auto-reply goes to General instead of topic:515

Expected Behavior

Pairing auto-reply should preserve message_thread_id and reply in the same topic where the original message was sent.

Actual Behavior

Auto-reply is sent to the General channel (root of the forum group), losing topic context.

Logs

telegram pairing request: asybereg (Asya Berezhnova) chatId:115683690
Approved telegram sender 115683690

Reply appeared in General, not in the topic where the user wrote.

Environment

  • OpenClaw version: 2026.2.1
  • Telegram group type: Supergroup with forum topics enabled
  • Config: groupPolicy: "allowlist", dmPolicy: "pairing"

Suggested Fix

Preserve message_thread_id from the incoming message context when sending pairing-related auto-replies in forum groups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions