mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update StatusTransformer
This commit is contained in:
parent
dfe2379b93
commit
65a048cdd5
3 changed files with 8 additions and 2 deletions
|
@ -24,7 +24,9 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract
|
||||||
{
|
{
|
||||||
$taggedPeople = MediaTagService::get($status->id);
|
$taggedPeople = MediaTagService::get($status->id);
|
||||||
$poll = $status->type === 'poll' ? PollService::get($status->id) : null;
|
$poll = $status->type === 'poll' ? PollService::get($status->id) : null;
|
||||||
$rendered = $status->caption ? Autolink::create()->autolink($status->caption) : null;
|
$rendered = config('exp.autolink') ?
|
||||||
|
( $status->caption ? Autolink::create()->autolink($status->caption) : '' ) :
|
||||||
|
( $status->rendered ?? $status->caption );
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'_v' => 1,
|
'_v' => 1,
|
||||||
|
|
|
@ -28,7 +28,9 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
$pid = request()->user()->profile_id;
|
$pid = request()->user()->profile_id;
|
||||||
$taggedPeople = MediaTagService::get($status->id);
|
$taggedPeople = MediaTagService::get($status->id);
|
||||||
$poll = $status->type === 'poll' ? PollService::get($status->id, $pid) : null;
|
$poll = $status->type === 'poll' ? PollService::get($status->id, $pid) : null;
|
||||||
$rendered = $status->caption ? Autolink::create()->autolink($status->caption) : null;
|
$rendered = config('exp.autolink') ?
|
||||||
|
( $status->caption ? Autolink::create()->autolink($status->caption) : '' ) :
|
||||||
|
( $status->rendered ?? $status->caption );
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'_v' => 1,
|
'_v' => 1,
|
||||||
|
|
|
@ -41,4 +41,6 @@ return [
|
||||||
|
|
||||||
// Post Update/Edits
|
// Post Update/Edits
|
||||||
'pue' => env('EXP_PUE', true),
|
'pue' => env('EXP_PUE', true),
|
||||||
|
|
||||||
|
'autolink' => env('EXP_AUTOLINK_V2', false),
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue