diff --git a/app/Transformer/Api/StatusStatelessTransformer.php b/app/Transformer/Api/StatusStatelessTransformer.php index b15fd6e2..3c2c02d6 100644 --- a/app/Transformer/Api/StatusStatelessTransformer.php +++ b/app/Transformer/Api/StatusStatelessTransformer.php @@ -24,7 +24,9 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract { $taggedPeople = MediaTagService::get($status->id); $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 [ '_v' => 1, diff --git a/app/Transformer/Api/StatusTransformer.php b/app/Transformer/Api/StatusTransformer.php index ca3e6783..22a840ce 100644 --- a/app/Transformer/Api/StatusTransformer.php +++ b/app/Transformer/Api/StatusTransformer.php @@ -28,7 +28,9 @@ class StatusTransformer extends Fractal\TransformerAbstract $pid = request()->user()->profile_id; $taggedPeople = MediaTagService::get($status->id); $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 [ '_v' => 1, diff --git a/config/exp.php b/config/exp.php index 0ace5135..e1446341 100644 --- a/config/exp.php +++ b/config/exp.php @@ -41,4 +41,6 @@ return [ // Post Update/Edits 'pue' => env('EXP_PUE', true), + + 'autolink' => env('EXP_AUTOLINK_V2', false), ];