We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch @bot-whatsapp/provider@0.1.38 for the project I'm working on.
@bot-whatsapp/provider@0.1.38
When I was using Mexican phone number with meta provider a '1' character to the body.to property. So this cause an invalid number.
Here is the diff that solved my problem:
diff --git a/node_modules/@bot-whatsapp/provider/lib/meta/index.cjs b/node_modules/@bot-whatsapp/provider/lib/meta/index.cjs index 5bbdeb3..e8d8b86 100644 --- a/node_modules/@bot-whatsapp/provider/lib/meta/index.cjs +++ b/node_modules/@bot-whatsapp/provider/lib/meta/index.cjs @@ -579,6 +579,13 @@ class MetaProvider extends ProviderClass { * @return {Object} The response data from the API. */ async sendMessageToApi(body) { + if (body.to.slice(0, 2) == '52') { + if (body.to.length > 12) { + let lada = body.to.slice(0, 2) + let number = body.to.slice(3, 14) + body.to = lada+number + } + } try { const response = await axios.post(`${URL$1}/${this.version}/${this.numberId}/messages`, body, { headers: {
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
Pueden usar versión 1.1.4-alpha.0 soluciona el problema para números méxicanos y argentinos Fixed en #1044
Sorry, something went wrong.
No branches or pull requests
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@bot-whatsapp/provider@0.1.38
for the project I'm working on.When I was using Mexican phone number with meta provider a '1' character to the body.to property. So this cause an invalid number.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: