netflie / whatsapp-cloud-api

The first PHP API to send and receive messages using a cloud-hosted version of the WhatsApp Business Platform
https://netflie.es/portfolio/whatsapp-business-cloud-api-php-sdk/
MIT License
484 stars 176 forks source link

Method replyTo should accept null as parameter #187

Open jfradj opened 7 months ago

jfradj commented 7 months ago

Hello,

I think that the the method prototype isn't totally correct:

public function replyTo(string $message_id): self

Indeed, it should allow to set the value to null, so the prototype should be:

public function replyTo(?string $message_id): self

(note the question mark to all null to be passed as an argument). Right now, I used the empty string as a workaround, but it's a little bit ugly 🥲

I've audited the code, and everything has been designed to make that possible.

aalbarca commented 4 months ago

Hi @jfradj could you please open a PR with the change? :pray: