feat(whatsapp): add debounceMs for batching rapid messages#971
Merged
steipete merged 3 commits intoJan 15, 2026
Merged
Conversation
Contributor
Author
Local Testing Results ✅Successfully tested the WhatsApp debouncing feature in a local deployment. The feature works exactly as designed! Test Environment
Test Case 1: Rapid Messages (Should Batch) ✅Sent messages in quick succession: Gateway logs: Result: ✅ All messages batched into a single 88-char message with newline separators. Only one agent run triggered ( Test Case 2: Slow Messages (Should NOT Batch) ✅Sent two messages 14 seconds apart:
Result: ✅ Two separate agent runs with different Confirmed Behaviors
ConfigurationThe {
"channels": {
"whatsapp": {
"debounceMs": 5000,
"dmPolicy": "allowlist",
"allowFrom": ["+15551234567"]
}
}
}Feature works perfectly! Ready to merge. 🚀 |
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 openclaw#967
steipete
force-pushed
the
feature/whatsapp-message-debounce
branch
from
January 15, 2026 23:07
1a6ab83 to
1561b1c
Compare
Contributor
|
Landed via squash after temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: 1561b1c\n- Merge commit: 4a99b9b\n\nThanks @juanpablodlc! |
3 tasks
dominicnunez
pushed a commit
to dominicnunez/openclaw
that referenced
this pull request
Feb 26, 2026
dustin-olenslager
pushed a commit
to dustin-olenslager/ironclaw-supreme
that referenced
this pull request
Mar 24, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
) * 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 openclaw#967 * chore: wip inbound debounce * fix: debounce inbound messages across channels (openclaw#971) (thanks @juanpablodlc) --------- Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
) * 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 openclaw#967 * chore: wip inbound debounce * fix: debounce inbound messages across channels (openclaw#971) (thanks @juanpablodlc) --------- Co-authored-by: Peter Steinberger <[email protected]>
jameslcowan
pushed a commit
to jameslcowan/openclaw
that referenced
this pull request
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements message debouncing for WhatsApp to batch rapid consecutive messages from the same sender.
Changes
Usage
```json5
{
"channels": {
"whatsapp": {
"debounceMs": 5000 // 5 second window
}
}
}
```
Testing
AI Assistance
Marked as AI-assisted - This PR was implemented with assistance from AI coding tools. I understand what the code does and have verified it works correctly.
Closes #967