diff --git a/src/Request/MessageRequest/RequestOptionsListMessage.php b/src/Request/MessageRequest/RequestOptionsListMessage.php index 32375e7..d758da2 100644 --- a/src/Request/MessageRequest/RequestOptionsListMessage.php +++ b/src/Request/MessageRequest/RequestOptionsListMessage.php @@ -18,15 +18,18 @@ public function body(): array 'type' => 'interactive', 'interactive' => [ 'type' => $this->message->type(), - 'header' => [ - 'type' => 'text', - 'text' => $this->message->header(), - ], 'body' => ['text' => $this->message->body()], 'action' => $this->message->action(), ], ]; + if ($this->message->header()) { + $body['interactive']['header'] = [ + 'type' => 'text', + 'text' => $this->message->header(), + ]; + } + if ($this->message->footer()) { $body['interactive']['footer'] = ['text' => $this->message->footer()]; }