From d7a346ec460a4b852238ad236578c1782734dd38 Mon Sep 17 00:00:00 2001 From: Marlin Forbes Date: Sun, 25 Aug 2024 04:21:37 +0200 Subject: [PATCH] Fix attachments error --- src/Responses/Threads/Messages/ThreadMessageResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Responses/Threads/Messages/ThreadMessageResponse.php b/src/Responses/Threads/Messages/ThreadMessageResponse.php index 8740aadd..9dc6c4d9 100644 --- a/src/Responses/Threads/Messages/ThreadMessageResponse.php +++ b/src/Responses/Threads/Messages/ThreadMessageResponse.php @@ -61,7 +61,7 @@ public static function from(array $attributes, MetaInformation $meta): self $attachments = array_map( fn (array $attachment): ThreadMessageResponseAttachment => ThreadMessageResponseAttachment::from($attachment), - $attributes['attachments'] + $attributes['attachments'] ?? [] ); return new self(