#6790: Messages: randomize ack reactions
docs
channel: telegram
channel: whatsapp-web
gateway
commands
agents
Cluster:
Reaction Event Handling Enhancements
Summary:
- Allow messages.ackReaction and WhatsApp ackReaction.emoji to accept emoji lists and randomize per message.
- Ensure Telegram uses the randomized ack reaction via shared resolution logic.
- Update schema/docs and add tests for selection + fallback behavior.
Testing:
- corepack pnpm vitest run src/channels/ack-reactions.test.ts src/agents/identity.test.ts
- corepack pnpm vitest run src/telegram/bot.test.ts
https://docs.openclaw.ai/gateway/configuration
https://docs.openclaw.ai/channels/whatsapp
<img width="356" height="300" alt="image" src="https://github.com/user-attachments/assets/518a5018-3385-411e-9707-3964459b08a7" />
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR extends ack reactions to accept either a single emoji or a list of emojis, selecting a random emoji per message.
Key changes:
- Adds `resolveAckReactionChoice` in `src/channels/ack-reactions.ts` and uses it from `src/agents/identity.ts` (for `messages.ackReaction`) and from the WhatsApp web ack reaction monitor (for `channels.whatsapp.ackReaction.emoji`).
- Updates config types and zod schemas to allow `string | string[]` for both message-level and WhatsApp-specific ack reaction configuration.
- Updates docs to describe array behavior and adds tests for random selection and fallback/disable behavior.
I wasn’t able to execute the vitest commands locally in this environment because `pnpm` isn’t available, so the review is based on code inspection only.
<h3>Confidence Score: 4/5</h3>
- This PR looks safe to merge with low risk; behavior changes are localized and covered by tests.
- Changes are straightforward (parsing + random selection), used consistently across message-level and WhatsApp-specific ack reactions, and include targeted unit tests. Main remaining risk is small schema/type drift from duplicating the union shape in multiple places, and I couldn’t run tests in this environment.
- src/channels/ack-reactions.ts; src/config/zod-schema.providers-whatsapp.ts; src/config/zod-schema.session.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#19917: feat(discord): allow disabling intermediate status reactions
by Gitjay11 · 2026-02-18
79.8%
#21346: [AI-assisted] Telegram: add reaction state machine with fallback an...
by Archie818 · 2026-02-19
77.5%
#17316: fix: ack reaction not removed when block streaming is enabled (Tele...
by czmathew · 2026-02-15
76.5%
#19816: feat(slack): add typingReaction config for DM typing indicator fall...
by dalefrieswthat · 2026-02-18
75.8%
#20399: feat(whatsapp): surface inbound reaction events to agent session
by andrewchen · 2026-02-18
75.5%
#20860: feat(reactions): add configurable immediate reaction dispatch system
by davidrudduck · 2026-02-19
75.0%
#7980: feat(telegram): multi-stage reaction system for message pipeline vi...
by macmimi23 · 2026-02-03
74.7%
#7353: fix: prevent silent message drops after config.patch restart
by 18-RAJAT · 2026-02-02
74.3%
#21029: Feature/telegram bot avatar clean
by aleonnet · 2026-02-19
74.2%
#22331: Fix Telegram reaction emoji normalization
by AIflow-Labs · 2026-02-21
74.0%