-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Bug: WhatsApp messageReceived hook opt-in docs/schema/runtime mismatch #86390
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
The WhatsApp
message_receivedhook opt-in is inconsistent across docs, config schema, plugin manifest, and runtime.In the current packages I checked, the documented config shape is rejected by config validation, while the schema-valid plugin config shape is not read by the WhatsApp runtime. The result is that operators cannot enable WhatsApp
message_receivedhooks using a single supported, validated configuration path.This is adjacent to, but narrower than, #78963. That issue asks for a first-class listen-only/hooks-only mode. This issue is specifically about the existing
pluginHooks.messageReceivedopt-in contract being internally inconsistent.What I checked
Installed runtime:
openclaw --version:OpenClaw 2026.5.20 (e510042)@openclaw/whatsapp@2026.5.20Latest stable package checked without installing/updating:
npm pack openclaw@2026.5.22npm pack @openclaw/whatsapp@2026.5.22The mismatch appears unchanged in the
2026.5.22tarballs.Evidence
1. Official docs document channel/account config
docs/channels/whatsapp.mdsays to enable hooks underchannels.whatsapp.pluginHooks.messageReceived:It also documents account-scoped opt-in under
channels.whatsapp.accounts.<accountId>.pluginHooks.messageReceived.2. The WhatsApp plugin manifest exposes plugin config instead
@openclaw/whatsapp/openclaw.plugin.jsonexposespluginHooks.messageReceivedin the pluginconfigSchema:{ "configSchema": { "properties": { "pluginHooks": { "properties": { "messageReceived": { "type": "boolean" } } } } } }That corresponds to config like:
{ "plugins": { "entries": { "whatsapp": { "config": { "pluginHooks": { "messageReceived": true } } } } } }3. Config validation rejects the documented channel-level key
Adding the docs shape under
channels.whatsapp.pluginHooksfails validation on my install:The schema-valid plugin config shape above is accepted.
4. Runtime reads only channel/account config
In
@openclaw/whatsapp@2026.5.20and the checked@openclaw/whatsapp@2026.5.22tarball, the runtime still reads onlyparams.cfg.channels?.whatsappand account config:It does not read
params.cfg.plugins?.entries?.whatsapp?.config, which is the schema-valid location provided by the plugin manifest.Expected behavior
There should be one documented, schema-valid, runtime-honored way to enable WhatsApp
message_receivedhooks.Either:
channels.whatsapp.pluginHooks.messageReceivedand account-levelpluginHooksvalid in the channel schema, matching docs and runtime; orplugins.entries.whatsapp.config.pluginHooks.messageReceived; orActual behavior
channels.whatsapp.pluginHooks.messageReceived.plugins.entries.whatsapp.config.pluginHooks.messageReceived.Impact
Operators cannot enable WhatsApp
message_receivedhooks reliably without either invalid config or local runtime patching. This blocks hook-based archival/ETL plugins and makes it hard to build safe WhatsApp ingestion flows without patching installed package internals.Related