mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 05:23:17 +00:00
Merge pull request #970 from pixelfed/frontend-ui-refactor
Update StatusTransformer
This commit is contained in:
commit
3ed62cce88
2 changed files with 2 additions and 1 deletions
|
@ -52,6 +52,7 @@ class StatusActivityPubDeliver implements ShouldQueue
|
|||
$audience = $status->profile->getAudienceInbox();
|
||||
$profile = $status->profile;
|
||||
|
||||
Cache::forget('status:transformer:media:attachments:'.$status->id);
|
||||
$fractal = new Fractal\Manager();
|
||||
$fractal->setSerializer(new ArraySerializer());
|
||||
$resource = new Fractal\Resource\Item($status, new CreateNote());
|
||||
|
|
|
@ -62,7 +62,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|||
|
||||
public function includeMediaAttachments(Status $status)
|
||||
{
|
||||
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addMinutes(30), function() use($status) {
|
||||
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addMinutes(3), function() use($status) {
|
||||
$media = $status->media()->orderBy('order')->get();
|
||||
return $this->collection($media, new MediaTransformer());
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue