mirror of https://github.com/pixelfed/pixelfed.git
Merge pull request #1329 from pixelfed/frontend-ui-refactor
Update StatusTransformers
This commit is contained in:
commit
25bf349af9
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue