-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
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
A forwarded message does not contain an ID in the message context #94
Comments
I think maybe the problem could be that the field is Thanks! |
Any news @angelomelonas ? |
Hi @aalbarca! My apologies, I was recently moving, so I was not able to have another look at this. I'll get back to you ASAP. |
It does indeed seem like the array:2 [
"object" => "whatsapp_business_account"
"entry" => array:1 [
0 => array:2 [
"id" => "101194536240516"
"changes" => array:1 [
0 => array:2 [
"value" => array:4 [
"messaging_product" => "whatsapp"
"metadata" => array:2 [
"display_phone_number" => "..."
"phone_number_id" => "101573099534713"
]
"contacts" => array:1 [
0 => array:2 [
"profile" => array:1 [
"name" => "..."
]
"wa_id" => "..."
]
]
"messages" => array:1 [
0 => array:6 [
"context" => array:1 [
"forwarded" => true
]
"from" => "..."
"id" => "..."
"timestamp" => "1679567250"
"type" => "audio"
"audio" => array:4 [
"mime_type" => "audio/ogg; codecs=opus"
"sha256" => "9/6n0ir1ABZwjZeyr3nHuXPFlkwQsG2SgmZDpLSi7Kw="
"id" => "6610964145599458"
"voice" => false
]
]
]
]
"field" => "messages"
]
]
]
]
] And a normal forwarded text message: array:2 [
"object" => "whatsapp_business_account"
"entry" => array:1 [
0 => array:2 [
"id" => "101194536240516"
"changes" => array:1 [
0 => array:2 [
"value" => array:4 [
"messaging_product" => "whatsapp"
"metadata" => array:2 [
"display_phone_number" => "..."
"phone_number_id" => "101573099534713"
]
"contacts" => array:1 [
0 => array:2 [
"profile" => array:1 [
"name" => "..."
]
"wa_id" => "..."
]
]
"messages" => array:1 [
0 => array:6 [
"context" => array:1 [
"forwarded" => true
]
"from" => "..."
"id" => "..."
"timestamp" => "1679567488"
"text" => array:1 [
"body" => "some forwarded text"
]
"type" => "text"
]
]
]
"field" => "messages"
]
]
]
]
] |
Have you perhaps had a moment to look at the response, @aalbarca? 😄 |
Could you maybe open a PR with the fix? 🙏 |
Fixed on 2.0.3 release. Thanks @angelomelonas for the PR ;) |
First of all, thank you for this excellent library!
I would like to report a bug that I found. If a voice note (media message) is forwarded, it does not contain the
id
field in$message['context']['id']
, resulting in the following exception:Would a solution be to make the
id
field in theContext
object optional? Then the code would be:I'd be happy to open a pull request for this 👍🏼
The text was updated successfully, but these errors were encountered: