Skip to content

fix: handle 'number' property in /chat/whatsappNumbers endpoint#211

Open
magodosreis wants to merge 1 commit intocode-chat-br:mainfrom
magodosreis:main
Open

fix: handle 'number' property in /chat/whatsappNumbers endpoint#211
magodosreis wants to merge 1 commit intocode-chat-br:mainfrom
magodosreis:main

Conversation

@magodosreis
Copy link

Description
This PR fixes a type error in the /chat/whatsappNumbers endpoint. The current implementation was expecting a structure that caused failures when the number property was provided directly. It also ensures the lid property is correctly handled in the response.

Payload Comparison
Before:

JSON
[
    {
        "jid": "xxxxxxx@s.whatsapp.net",
        "exists": true
    }
]
After:

JSON
[
    {
        "jid": `"xxxxxxx@s.whatsapp.net",`
        "exists": true,
        "lid": "xxxxxx@lid"
    }
]

Changes
Adjusted the whatsappNumbers service to correctly handle the number property.

Included support for the lid (List ID) property in the response object.

Improved stability for the /chat/whatsappNumbers query.````

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.

1 participant