Skip to content

Commit

Permalink
Merge pull request #1245 from discord-php/1239-fix/interactions-messa…
Browse files Browse the repository at this point in the history
…ge-content-cannot-be-null

fix MessageBuilder to allow null on empty payload with files in multipart
  • Loading branch information
SQKo committed Jul 21, 2024
2 parents fe6c8f1 + 4074a4f commit 1879297
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Discord/Builders/MessageBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1879297

Please sign in to comment.