Skip to content

Include forward_from_chat metadata in forwarded message format (Telegram) #8133

@thonyAGP

Description

@thonyAGP

Feature Request

When a user forwards a message from a Telegram group into another group where the bot is active, the Telegram Bot API provides orward_from_chat (or orward_origin in newer API versions) metadata containing the source chat ID, name, and type.

Currently, Clawdbot only passes the original sender's name in the forwarded message format:
\
[Forwarded from Username at 2026-02-03T14:50:30.000Z] Message text
\\

Requested behavior

Include the source chat metadata when available, for example:
\
[Forwarded from Username at 2026-02-03T14:50:30.000Z, chat: GroupName (id: -1234567890)] Message text
\\

Or expose it as structured metadata the agent can access.

Use case

I use a Telegram group as a control panel to manage the group allowlist. When a message is forwarded from another group, the agent should be able to extract the source group ID automatically and propose adding it to the allowlist — without requiring the user to manually look up the ID via @userinfobot.

Current workaround

The user has to:

  1. Forward the message to @userinfobot in DM
  2. Copy the group ID
  3. Paste it in the control panel group

This should be a single forward action.

Environment

  • Channel: Telegram
  • Clawdbot version: 2026.1.24-3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions