Skip to content

Commit

Permalink
Merge pull request #162 from limsenkeat/fix-send-document-caption-opt…
Browse files Browse the repository at this point in the history
…ional

fix-send-document-caption-optional: document caption is not required,…
  • Loading branch information
aalbarca authored Jul 14, 2024
2 parents 79632d0 + 63c7b07 commit 9550310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WhatsAppCloudApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function sendTextMessage(string $to, string $text, bool $preview_url = fa
*
* @throws Response\ResponseException
*/
public function sendDocument(string $to, MediaID $document_id, string $name, ?string $caption): Response
public function sendDocument(string $to, MediaID $document_id, string $name, ?string $caption = ''): Response
{
$message = new Message\DocumentMessage($to, $document_id, $name, $caption, $this->reply_to);
$request = new Request\MessageRequest\RequestDocumentMessage(
Expand Down

0 comments on commit 9550310

Please sign in to comment.