diff --git a/src/Messages/Channel/WhatsApp/WhatsAppAudio.php b/src/Messages/Channel/WhatsApp/WhatsAppAudio.php index 8519c39c..0b8575ab 100644 --- a/src/Messages/Channel/WhatsApp/WhatsAppAudio.php +++ b/src/Messages/Channel/WhatsApp/WhatsAppAudio.php @@ -26,10 +26,7 @@ public function toArray(): array { $returnArray = $this->getBaseMessageUniversalOutputArray(); $returnArray['audio'] = $this->audioObject->toArray(); - - if (!is_null($this->context)) { - $returnArray['context'] = $this->context; - } + $returnArray['context'] = $this->context ?? null; return $returnArray; }