Closed rnbrady closed 8 months ago
PS: Just seen you already merged my previous PR, thanks! Let me know here if you'd like a PR for the other fields above.
Hello!
I'm glad to hear that you are finding this project useful, and thanks for contributing!
Regarding the issue, I have just checked and you are absolutely correct. If you don't mind, please send the pull request, and I'll accept it. π
Hi @rnbrady! Do you still want to send the pr? If not, I'll do it np :+1: .
I'm not so confident in the changes any more.
language.policy
optional, because it's missing in the example that I used, and the API accepted requests that I made without it. However, the docs state that it's required, so it should probably stay that way in your lib.category
seems to be something that you would specify when creating a template but not when using it. When creating a template it would be required but when using a template it would not be present. Do the two scenarios share the same type? I would expect a TemplateMessage
to use a MessageTemplate
and only the latter would have a category.I submitted #18 in case it's useful.
Side note: I'm using your lib with Next.js, so I'm import the handler like this:
import { Webhook, WebhookEvents } from 'whatsapp-business';
import { webhookHandler } from 'whatsapp-business/dist/src/webhooks/helpers';
I might send a PR in the future to simplify that.
Good morning @!
First of all, thank you very much for this careful response!
About the policy, let's better leave it required, because now that you mention it, I remember that a few months ago, the API failed when I didn't specify it.
In regards to the category, I've seen this on the changelog
Which affects all the APIs. Also, when I implemented it, I tested what happened if I didn't provide the category and it failed. But I was also confused with the fact that in the actual docs it was mentioned.
Anyway, I will accept your pr because it makes sense to leave it optional as it is in the docs, but maybe we could add some doc comment that warns that if the API fails then try by specifying the category.
Again, thank you some much for the pr, and about the import; anything that improves the code is welcomed!!
:tada: This issue has been resolved in version 1.7.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
whatsapp-business@1.7.1
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.