Skip to content

fix(whatsapp): enable reactions in group chats#640

Merged
steipete merged 2 commits intoopenclaw:mainfrom
mcinteerj:fix/whatsapp-group-reactions
Jan 10, 2026
Merged

fix(whatsapp): enable reactions in group chats#640
steipete merged 2 commits intoopenclaw:mainfrom
mcinteerj:fix/whatsapp-group-reactions

Conversation

@mcinteerj
Copy link
Copy Markdown
Contributor

Summary

This PR enables the agent to successfully send reactions in WhatsApp group chats by solving two critical issues:

  1. Metadata Preservation: Group history now stores uid=501(jakemc) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae),701(com.apple.sharepoint.group.1) (message ID) and for historical messages. These are injected into the group context sandwich as [message_id: ...] hints so the agent can reference them.
  2. JID Normalization: The WhatsApp reaction tool now correctly normalizes participant phone numbers (e.g., +6421...) to JIDs (6421...@s.whatsapp.net) before sending to the server.

Related

Changes

  • src/web/auto-reply.ts:
    • Updated groupHistories map to store id and senderJid.
    • Injected [message_id: ID] into stringified group history context.
  • src/web/inbound.ts: Normalizes the participant JID in sendReaction using toWhatsappJid.
  • src/web/monitor-inbox.test.ts: Added unit test for JID normalization in reactions.

Testing

Verified that sendReaction now receives a correctly formatted JID. Tested group history injection logic.

@steipete steipete force-pushed the fix/whatsapp-group-reactions branch from 04f3849 to 7e6fa94 Compare January 10, 2026 19:41
@steipete steipete merged commit ec10475 into openclaw:main Jan 10, 2026
17 of 20 checks passed
@steipete
Copy link
Copy Markdown
Contributor

Landed via temp rebase onto main.\n\n- Gate: pnpm lint (fails on main formatting in bash-tools/sandbox-explain/cli files), pnpm build, pnpm test\n- Land commit: 7e6fa94\n- Merge commit: ec10475\n\nThanks @mcinteerj!

zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…ctions

fix(whatsapp): enable reactions in group chats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants