Menu

One phone number, two users: normalising WhatsApp sender IDs across Baileys and the Cloud API
📰

One phone number, two users: normalising WhatsApp sender IDs across Baileys and the Cloud API

DEV Community: database·Ali Ahmed·11 days ago
#xP46IEZK
#devtodatabase#devto#dev#whatsapp#user
Reading 0:00
15s threshold

If a system can receive messages from the same person through two integrations, both must produce the same user ID , or that person silently becomes two users with different permissions. In NanoClaw , the Baileys WhatsApp integration identified a sender as [email protected] (a JID), while the WhatsApp Cloud API path used the bare wa_id , 15551234567 . Roles and group memberships granted to one identity never applied to the other. My fix ( #3070 , in review) normalises the handle at one point and migrates existing data, merging the duplicates.

Why did one number become two users?

Path Sender handle Stored user ID

Baileys (native WhatsApp Web protocol) [email protected] whatsapp:[email protected]

WhatsApp Cloud API (via a chat SDK bridge) 15551234567 whatsapp:15551234567

Both paths use the channel type whatsapp , so the two IDs became two rows in users .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.