-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Added support for Interactive reply buttons media header #212
base: main
Are you sure you want to change the base?
Added support for Interactive reply buttons media header #212
Conversation
$header = new TextHeader($header); | ||
} | ||
|
||
if (!$header instanceof ButtonHeader && $header !== null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this if is not necessary, should you use type hinting in the function:
public function sendButton(string $to, string $body, ButtonAction $action, ?string | ?ButtonHeader $header = null, ?string $footer = null): Response
|
||
class ButtonReplyMessage extends Message | ||
final class ButtonReplyMessage extends Message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class ButtonReplyMEssage
yet exists in previous versions so you cannot convert it to final class because this is a breaking change (if anyone extended this class in our code you'll be breaking it)
This PR includes support for button reply media headers (image, video, documents).
It maintains existing text header usage without breaking the code by simply swapping the current text header to an instance of a Text Button Reply Header class.
Reference: https://developers.facebook.com/docs/whatsapp/cloud-api/messages/interactive-reply-buttons-messages/