Skip to content

Add slash command support to OpenClaw WeChat channel #4

@thisnick

Description

@thisnick

Problem

The WeChat OpenClaw channel does not handle slash commands (e.g. /reset, /status). We set CommandBody: rawBody but are missing:

  • hasControlCommand() — detect if a message is a control command
  • resolveControlCommandGate() — authorization check for who can run commands
  • CommandAuthorized flag in the inbound context payload
  • BodyForCommands field

Without CommandAuthorized: true, OpenClaw ignores slash commands from incoming messages.

Reference

BlueBubbles extension (monitor.ts) has a full implementation of command gating with access group support. WhatsApp likely similar.

Tasks

  • Add hasControlCommand check before dispatch
  • Add resolveControlCommandGate for group authorization
  • Set CommandAuthorized and BodyForCommands in context payload
  • Allow commands to bypass mention gating in groups (when authorized)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions