#12894: feat(whatsapp): add reaction notifications support
channel: whatsapp-web
size: S
Cluster:
Reaction Event Handling Enhancements
## Summary
Adds support for WhatsApp reaction notifications.
## Changes
- Listen for messages.reaction events from Baileys
- Emit system events when reactions are added/removed
- Log reaction events for debugging
- Cleanup listener on close
## Testing
- [x] Build passes
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Adds WhatsApp reaction notification support by listening to reaction events from the Baileys library. The implementation follows established patterns in the codebase:
- Records channel activity for reaction events
- Resolves reactor JID to E164 format using existing helper
- Enqueues system events for agent notification
- Properly logs reaction events for debugging
- Correctly cleans up event listeners on connection close
The change is isolated to `src/web/inbound/monitor.ts` and integrates cleanly with existing message handling infrastructure. The session key is currently hardcoded with a TODO comment acknowledging the need to resolve via routing in the future.
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge with low risk
- The implementation follows existing patterns in the codebase and is well-contained to a single file. The code properly handles errors, cleans up listeners, and integrates with existing infrastructure. The hardcoded session key is acknowledged with a TODO comment. However, there's a minor issue with type safety where the code uses a type assertion to access `reaction.key.participant` which may not exist in the actual Baileys type definition.
- No files require special attention
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#20399: feat(whatsapp): surface inbound reaction events to agent session
by andrewchen · 2026-02-18
90.7%
#13641: feat(whatsapp): surface incoming reaction events to agent
by asklee-klawd · 2026-02-10
87.8%
#22919: WhatsApp: add lifecycle status reactions
by tristanmanchester · 2026-02-21
78.3%
#20860: feat(reactions): add configurable immediate reaction dispatch system
by davidrudduck · 2026-02-19
78.0%
#7287: feat(whatsapp): expose group admin functions
by balthazar-bot · 2026-02-02
77.9%
#16716: feat(feishu): add reaction event support (created/deleted)
by schumilin · 2026-02-15
77.2%
#8224: feat(whatsapp): extract @mentions into dedicated module
by zurizuriaria · 2026-02-03
75.9%
#23579: feat(whatsapp): add sender attribution to inbound message logs
by svan058 · 2026-02-22
75.9%
#19757: fix(security): OC-91 enforce JID allowlist validation in WhatsApp s...
by aether-ai-agent · 2026-02-18
75.2%
#7980: feat(telegram): multi-stage reaction system for message pipeline vi...
by macmimi23 · 2026-02-03
74.3%