Closed josimarcordeiro closed 9 months ago
I'm Having the same challenge here... I've looked through the codebase and can see that the MessageRequest body doesn't include the context parameter.
I Might just need to make a fork and try to add it myself or something...
@josimarcordeiro I've implemented a method for this in https://github.com/johnflash4real/whatsapp-cloud-api/tree/add-reply-buttons
I Made it as simple as calling a chainable method
$whatsAppApi->asReplyTo($originalMsgId)->sendTextMessage(...);
Also added replyButtons as that was missing.
Hi @johnflash4real I saw a lot of improvements in your repository. You should to try open new PR on this main repository to help to the all community :pray:
@aalbarca Yeah, I would love to... Except that I haven't found the time to add tests for my changes yet. Did it pretty much in a rush.
Hi @aalbarca Congratulations on the excellent work you are doing here. Could you implement this functionality in the next version?
@josimarcordeiro the feature will be released today.
According to the WhatsApp API documentation, it is possible to send a response message by including the context > message_id parameter in the request body. How to do this with your library?
{ "messaging_product": "whatsapp", "recipient_type": "individual", "to": "{{Recipient-Phone-Number}}", "context": { "message_id": "<MSGID_OF_PREV_MSG>" }, "type": "text", "text": { "preview_url": false, "body": "<TEXT_MSG_CONTENT>" } }