openclaw/docs/gateway
juanpablodlc 4a99b9b651
feat(whatsapp): add debounceMs for batching rapid messages (#971)
* feat(whatsapp): add debounceMs for batching rapid messages

Add a `debounceMs` configuration option to WhatsApp channel settings
that batches rapid consecutive messages from the same sender into a
single response. This prevents triggering separate agent runs for
each message when a user sends multiple short messages in quick
succession (e.g., "Hey!", "how are you?", "I was wondering...").

Changes:
- Add `debounceMs` config to WhatsAppConfig and WhatsAppAccountConfig
- Implement message buffering in `monitorWebInbox` with:
  - Map-based buffer keyed by sender (DM) or chat ID (groups)
  - Debounce timer that resets on each new message
  - Message combination with newline separator
  - Single message optimization (no modification if only one message)
- Wire `debounceMs` through account resolution and monitor tuning
- Add UI hints and schema documentation

Usage example:
{
  "channels": {
    "whatsapp": {
      "debounceMs": 5000  // 5 second window
    }
  }
}

Default behavior: `debounceMs: 0` (disabled by default)

Verified: All existing tests pass (3204 tests), TypeScript compilation
succeeds with no errors.

Implemented with assistance from AI coding tools.

Closes #967

* chore: wip inbound debounce

* fix: debounce inbound messages across channels (#971) (thanks @juanpablodlc)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-15 23:07:19 +00:00
..
authentication.md docs: clarify Claude CLI auth mode 2026-01-15 02:35:20 +00:00
background-process.md docs: note child process bridge helper 2026-01-15 06:59:02 +00:00
bonjour.md Docs: fix internal links 2026-01-10 14:51:33 -06:00
bridge-protocol.md docs: add protocol docs 2026-01-12 04:44:27 +00:00
cli-backends.md chore: standardize Claude Code CLI naming (#915) 2026-01-14 20:07:35 +00:00
configuration-examples.md feat: add web tools 2026-01-15 04:07:40 +00:00
configuration.md feat(whatsapp): add debounceMs for batching rapid messages (#971) 2026-01-15 23:07:19 +00:00
discovery.md docs: clarify multi-gateway rescue bot guidance 2026-01-15 22:10:27 +00:00
doctor.md chore: drop Clawdis legacy references 2026-01-15 06:18:44 +00:00
gateway-lock.md docs: clarify multi-gateway rescue bot guidance 2026-01-15 22:10:27 +00:00
health.md docs: complete channels rename sweep 2026-01-13 08:40:39 +00:00
heartbeat.md docs: complete channels rename sweep 2026-01-13 08:40:39 +00:00
index.md docs: clarify multi-gateway rescue bot guidance 2026-01-15 22:10:27 +00:00
local-models.md docs: simplify local models guidance 2026-01-13 03:26:00 +00:00
logging.md fix: finalize channels rename cleanup 2026-01-13 08:40:40 +00:00
multiple-gateways.md docs: clarify multi-gateway rescue bot guidance 2026-01-15 22:10:27 +00:00
openai-http-api.md Gateway: disable OpenAI HTTP chat completions by default (#686) 2026-01-10 21:55:54 +00:00
pairing.md docs: refresh and simplify docs 2026-01-08 23:07:20 +01:00
protocol.md refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
remote-gateway-readme.md docs: make remote host examples generic 2026-01-12 02:11:33 +00:00
remote.md docs: clarify multi-gateway rescue bot guidance 2026-01-15 22:10:27 +00:00
sandbox-vs-tool-policy-vs-elevated.md docs: clarify agent auth + sandboxed skills 2026-01-15 04:51:03 +00:00
sandboxing.md docs: clarify sandbox bind mounts (#790) 2026-01-12 22:06:35 +00:00
security.md feat(security): expand audit and safe --fix 2026-01-15 05:31:43 +00:00
tailscale.md feat: add Chrome extension browser relay 2026-01-15 04:52:28 +00:00
troubleshooting.md chore: drop Clawdis legacy references 2026-01-15 06:18:44 +00:00