diff --git a/src/Messages/Channel/WhatsApp/WhatsAppImage.php b/src/Messages/Channel/WhatsApp/WhatsAppImage.php index 17ce1c7a..8a702daa 100644 --- a/src/Messages/Channel/WhatsApp/WhatsAppImage.php +++ b/src/Messages/Channel/WhatsApp/WhatsAppImage.php @@ -26,10 +26,7 @@ public function toArray(): array { $returnArray = $this->getBaseMessageUniversalOutputArray(); $returnArray['image'] = $this->image->toArray(); - - if (!is_null($this->context)) { - $returnArray['context'] = $this->context; - } + $returnArray['context'] = $this->context ?? null; return $returnArray; }