fix(whatsapp): normalize bare phone targets to JIDs - #8639
Closed
sgaofen wants to merge 1 commit into
Closed
Conversation
sgaofen
marked this pull request as ready for review
April 13, 2026 00:51
Collaborator
1 similar comment
Collaborator
This was referenced Jun 21, 2026
Contributor
|
Merged via #50379. Your fix was cherry-picked onto current main with your authorship preserved in git history (commit a4b1554). The adapter had been migrated to a bundled plugin and the WhatsApp identity helpers extracted since you opened this, so the normalizer now lives in |
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
@s.whatsapp.netJIDs before sending them to the local bridgesend_messagetool pathRoot Cause
Both
tools/send_message_tool.pyandgateway/platforms/whatsapp.pypassed raw phone numbers directly to the Baileys bridge. Baileys expects a WhatsApp JID like50766715226@s.whatsapp.net, so bare numbers causedjidDecode(...)to returnundefinedand the bridge crashed with HTTP 500.Closes #8637.
Testing
python3 -m py_compile gateway/platforms/whatsapp.py tools/send_message_tool.py tests/gateway/test_whatsapp_connect.py tests/tools/test_send_message_tool.pyuv run --extra dev pytest tests/gateway/test_whatsapp_connect.py -quv run --extra dev pytest tests/tools/test_send_message_tool.py -q -k 'whatsapp'Platform Tested
Contribution Guide Notes
CONTRIBUTING.mdand checked for existing open PRs before submitting this scoped bug fix.pytest tests/ -qpass unless explicitly noted.