From ef8960c0914999f8fcc080b9fcfb99ae039be3ed Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 3 Jun 2019 14:47:14 -0600 Subject: [PATCH] Update StatusTransformers --- app/Transformer/Api/StatusStatelessTransformer.php | 2 +- app/Transformer/Api/StatusTransformer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Transformer/Api/StatusStatelessTransformer.php b/app/Transformer/Api/StatusStatelessTransformer.php index 12e444322..1b6cb4543 100644 --- a/app/Transformer/Api/StatusStatelessTransformer.php +++ b/app/Transformer/Api/StatusStatelessTransformer.php @@ -68,7 +68,7 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract public function includeMediaAttachments(Status $status) { return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addMinutes(3), function() use($status) { - if(in_array($status->type, ['photo', 'video'])) { + if(in_array($status->type, ['photo', 'video', 'photo:album', 'loop'])) { $media = $status->media()->orderBy('order')->get(); return $this->collection($media, new MediaTransformer()); } diff --git a/app/Transformer/Api/StatusTransformer.php b/app/Transformer/Api/StatusTransformer.php index 3e7629635..732bfc1d1 100644 --- a/app/Transformer/Api/StatusTransformer.php +++ b/app/Transformer/Api/StatusTransformer.php @@ -68,7 +68,7 @@ class StatusTransformer extends Fractal\TransformerAbstract public function includeMediaAttachments(Status $status) { return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addMinutes(3), function() use($status) { - if(in_array($status->type, ['photo', 'video'])) { + if(in_array($status->type, ['photo', 'video', 'photo:album', 'loop'])) { $media = $status->media()->orderBy('order')->get(); return $this->collection($media, new MediaTransformer()); }