Hello @renatoiub,
First of all, thank you very much for maintaining this fork. Your custom fixes for P2P statuses and companion devices have been incredibly helpful for our platform!
I'm opening this issue to report a critical bug that is currently affecting all bots running on WSocket (which is based on Baileys v6.7.x).
The Problem
WhatsApp recently rolled out the new @username feature globally. When a user configures a username, WhatsApp hides their real phone number and changes the underlying protocol payload. Instead of using the traditional @s.whatsapp.net JID, incoming messages from these users arrive using the anonymous @lid (Local Identifier) structure.
Because WSocket currently lacks the updated protobuf definitions and cryptographic mappings to decrypt these specific LID payloads, any incoming message from a user with a @username fails to decrypt and is silently dropped. The wbotMessageListener (or messages.upsert event) never fires for these messages.
The Upstream Solution
The official WhiskeySockets/Baileys repository has already patched this critical issue by migrating to version 7.x.x. They introduced comprehensive LID support, including:
- Changing
isJidUser to isPnUser
- Adding new
remoteJidAlt and participantAlt fields inside msg.key to properly map the hidden LIDs to phone numbers.
- Updating the auth state logic to correctly cache
lid-mappings and tctokens.
Request
Since migrating away from your fork would mean losing your excellent patches for Statuses and Companion Device stability, we would deeply appreciate it if you could merge the upstream changes from WhiskeySockets/Baileys (v7.0.0+) into the main branch of WSocket.
Right now, businesses are losing customer messages entirely if the customer happens to have a WhatsApp username active.
Thank you again for your time and your great work on this repository! Let me know if you need me to provide any specific logs.
Hello @renatoiub,
First of all, thank you very much for maintaining this fork. Your custom fixes for P2P statuses and companion devices have been incredibly helpful for our platform!
I'm opening this issue to report a critical bug that is currently affecting all bots running on
WSocket(which is based on Baileys v6.7.x).The Problem
WhatsApp recently rolled out the new
@usernamefeature globally. When a user configures a username, WhatsApp hides their real phone number and changes the underlying protocol payload. Instead of using the traditional@s.whatsapp.netJID, incoming messages from these users arrive using the anonymous@lid(Local Identifier) structure.Because
WSocketcurrently lacks the updated protobuf definitions and cryptographic mappings to decrypt these specific LID payloads, any incoming message from a user with a @username fails to decrypt and is silently dropped. ThewbotMessageListener(ormessages.upsertevent) never fires for these messages.The Upstream Solution
The official
WhiskeySockets/Baileysrepository has already patched this critical issue by migrating to version 7.x.x. They introduced comprehensive LID support, including:isJidUsertoisPnUserremoteJidAltandparticipantAltfields insidemsg.keyto properly map the hidden LIDs to phone numbers.lid-mappingsandtctokens.Request
Since migrating away from your fork would mean losing your excellent patches for Statuses and Companion Device stability, we would deeply appreciate it if you could merge the upstream changes from WhiskeySockets/Baileys (v7.0.0+) into the
mainbranch ofWSocket.Right now, businesses are losing customer messages entirely if the customer happens to have a WhatsApp username active.
Thank you again for your time and your great work on this repository! Let me know if you need me to provide any specific logs.