From 4074a4f81ce44a0a740c6d5026eba54d0df73d01 Mon Sep 17 00:00:00 2001 From: SQKo <87897282+SQKo@users.noreply.github.com> Date: Sun, 21 Jul 2024 20:18:59 +0700 Subject: [PATCH] fix(message-builder): allow null on empty payload with files in multipart --- src/Discord/Builders/MessageBuilder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord/Builders/MessageBuilder.php b/src/Discord/Builders/MessageBuilder.php index d5c3f1a69..5764108b1 100644 --- a/src/Discord/Builders/MessageBuilder.php +++ b/src/Discord/Builders/MessageBuilder.php @@ -624,12 +624,12 @@ public function toMultipart(bool $payload = true): Multipart /** * {@inheritDoc} */ - public function jsonSerialize(): array + public function jsonSerialize(): ?array { $empty = true; if (! empty($this->files)) { - $body = []; + $body = null; $empty = false; }