Update StatusTransformers

This commit is contained in:
Daniel Supernault 2019-06-03 14:47:14 -06:00
parent f9f38ac4d4
commit ef8960c091
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 2 additions and 2 deletions

View file

@ -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());
}

View file

@ -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());
}