diff --git a/src/Messages/Channel/WhatsApp/WhatsAppCustom.php b/src/Messages/Channel/WhatsApp/WhatsAppCustom.php index 23572e99..7a1489d5 100644 --- a/src/Messages/Channel/WhatsApp/WhatsAppCustom.php +++ b/src/Messages/Channel/WhatsApp/WhatsAppCustom.php @@ -35,10 +35,7 @@ public function toArray(): array { $returnArray = $this->getBaseMessageUniversalOutputArray(); $returnArray['custom'] = $this->getCustom(); - - if (!is_null($this->context)) { - $returnArray['context'] = $this->context; - } + $returnArray['context'] = $this->context ?? null; return $returnArray; }