Files
openclaw/docs/cli/directory.md
Vincent Koc 0fad53a192 feat(whatsapp): support newsletter targets in message tool (#73393)
Summary:
- Adds WhatsApp `@newsletter` target normalization, outbound allowFrom bypass, channel session routing, composing-presence suppression, docs/changelog updates, and focused tests.
- Reproducibility: yes. Source inspection on current main shows a `120363401234567890@newsletter` target normalizes to null before outbound send, and the current session route has only direct/group semantics.

ClawSweeper fixups:
- Included follow-up commit: fix(clownfish): address review for ghcrawl-156943-autonomous-smoke (1)
- Included follow-up commit: feat(whatsapp): support newsletter targets in message tool

Validation:
- ClawSweeper review passed for head 9ff3f88202.
- Required merge gates passed before the squash merge.

Prepared head SHA: 9ff3f88202
Review: https://github.com/openclaw/openclaw/pull/73393#issuecomment-4338584612

Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-02 20:09:31 +00:00

2.3 KiB

summary, read_when, title
summary read_when title
CLI reference for `openclaw directory` (self, peers, groups)
You want to look up contacts/groups/self ids for a channel
You are developing a channel directory adapter
Directory

openclaw directory

Directory lookups for channels that support it (contacts/peers, groups, and “me”).

Common flags

  • --channel <name>: channel id/alias (required when multiple channels are configured; auto when only one is configured)
  • --account <id>: account id (default: channel default)
  • --json: output JSON

Notes

  • directory is meant to help you find IDs you can paste into other commands (especially openclaw message send --target ...).
  • For many channels, results are config-backed (allowlists / configured groups) rather than a live provider directory.
  • Installed channel plugins can still omit directory support; in that case the command reports the unsupported directory operation instead of reinstalling the plugin.
  • Default output is id (and sometimes name) separated by a tab; use --json for scripting.

Using results with message send

openclaw directory peers list --channel slack --query "U0"
openclaw message send --channel slack --target user:U012ABCDEF --message "hello"

ID formats (by channel)

  • WhatsApp: +15551234567 (DM), 1234567890-1234567890@g.us (group), 120363123456789@newsletter (Channel/Newsletter outbound target)
  • Telegram: @username or numeric chat id; groups are numeric ids
  • Slack: user:U… and channel:C…
  • Discord: user:<id> and channel:<id>
  • Matrix (plugin): user:@user:server, room:!roomId:server, or #alias:server
  • Microsoft Teams (plugin): user:<id> and conversation:<id>
  • Zalo (plugin): user id (Bot API)
  • Zalo Personal / zalouser (plugin): thread id (DM/group) from zca (me, friend list, group list)

Self ("me")

openclaw directory self --channel zalouser

Peers (contacts/users)

openclaw directory peers list --channel zalouser
openclaw directory peers list --channel zalouser --query "name"
openclaw directory peers list --channel zalouser --limit 50

Groups

openclaw directory groups list --channel zalouser
openclaw directory groups list --channel zalouser --query "work"
openclaw directory groups members --channel zalouser --group-id <id>