Skip to content

fix: update requestPairingCode#72

Open
joaosouz4dev wants to merge 10 commits intocanove:mainfrom
joaosouz4dev:main
Open

fix: update requestPairingCode#72
joaosouz4dev wants to merge 10 commits intocanove:mainfrom
joaosouz4dev:main

Conversation

@joaosouz4dev
Copy link
Copy Markdown

No description provided.

joaosouz4dev and others added 8 commits February 20, 2026 01:30
Refactor requestPairingCode to include ephemeral key generation and handle push notification visibility.
…nd improve structure

Refactor requestPairingCode to allow for optional custom pairing codes, enforce length validation, and streamline the process of sending the pairing request. Update AuthenticationCreds type to include pairingRef.
…rence

Update the requestPairingCode function to generate an ephemeral key pair and store the pairing reference for improved security and functionality. Modify AuthenticationCreds to include pairingRef and ensure proper handling of push notification visibility.
Introduce a mapping for custom platform names to valid OS names in the socket module. This enhancement ensures that the platform display correctly reflects the operating system when connecting to WhatsApp servers. Additionally, update the build commands in the settings file to include yarn support.
Enhance the handling of link_code_companion_reg notifications by adding checks for the presence of required credentials and buffers. Introduce logging for incomplete notifications to aid in debugging. Additionally, update the .gitignore to include the .claude directory and modify build commands in settings.local.json to support npm.
Add a check in the sendMessageAck function to skip acknowledgment if the WebSocket connection is not open, improving error handling and logging for message delivery.
…andling

Refactor the handling of link_code_companion_reg notifications by enhancing the readability of conditional checks and improving logging for missing credentials and buffers. This change aims to facilitate debugging and maintain code clarity.
@canove
Copy link
Copy Markdown
Owner

canove commented Feb 21, 2026

Consegue explicar a motivação?

@joaosouz4dev
Copy link
Copy Markdown
Author

Consegue explicar a motivação?

Sim, claro, estava falhando e nem chegava a notificação push.

@canove
Copy link
Copy Markdown
Owner

canove commented Feb 21, 2026

acabei de testar e funcionou normalmente. chegou a push e depois de digitar o código pareou normal.
vc está usando custom code ou deixando ele gerar aleatório?

@joaosouz4dev
Copy link
Copy Markdown
Author

Fiz para um cliente usando um projeto costumizado: https://github.com/joaosouz4dev/evo-whaileys/tree/whaileys
Os testes a maioria foi utilizado whatsapp business, to tendo outro erro tambem que seria na parte de mudar o nome ta falhando:
updateProfileName

@joaosouz4dev
Copy link
Copy Markdown
Author

{
"status": 400,
"error": "Bad Request",
"response": {
"message": [
"Session keys missing. Reconnect the instance to resync the app state before updating the profile."
]
}
}

Enhance the AuthenticationCreds type by making the pairingEphemeralKeyPair readonly and adding routingInfo and additionalData properties. Update SignalDataTypeMap to change session and sender-key types to Uint8Array, and introduce new types for lid-mapping and device-list. These changes improve type safety and clarity in the codebase.
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