diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 3a309145c..4cb8b919d 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -3494,7 +3494,7 @@ class ApiV1Controller extends Controller return []; } - $defaultCaption = config_cache('database.default') === 'mysql' ? null : ""; + $defaultCaption = ""; $content = $request->filled('status') ? strip_tags($request->input('status')) : $defaultCaption; $cw = $user->profile->cw == true ? true : $request->boolean('sensitive', false); $spoilerText = $cw && $request->filled('spoiler_text') ? $request->input('spoiler_text') : null; diff --git a/app/Http/Controllers/Api/ApiV1Dot1Controller.php b/app/Http/Controllers/Api/ApiV1Dot1Controller.php index bb82521b6..c84dcae1c 100644 --- a/app/Http/Controllers/Api/ApiV1Dot1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Dot1Controller.php @@ -1292,7 +1292,7 @@ class ApiV1Dot1Controller extends Controller if ($user->last_active_at == null) { return []; } - $defaultCaption = config_cache('database.default') === 'mysql' ? null : ""; + $defaultCaption = ""; $content = $request->filled('status') ? strip_tags(Purify::clean($request->input('status'))) : $defaultCaption; $cw = $user->profile->cw == true ? true : $request->boolean('sensitive', false); $spoilerText = $cw && $request->filled('spoiler_text') ? $request->input('spoiler_text') : null; diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index f529b0ebd..3521a61d5 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -55,14 +55,12 @@ class CommentController extends Controller } $reply = DB::transaction(function () use ($comment, $status, $profile, $nsfw) { - $defaultCaption = config_cache('database.default') === 'mysql' ? null : ""; - $scope = $profile->is_private == true ? 'private' : 'public'; $reply = new Status; $reply->profile_id = $profile->id; $reply->is_nsfw = $nsfw; $reply->caption = Purify::clean($comment); - $reply->rendered = $defaultCaption; + $reply->rendered = ""; $reply->in_reply_to_id = $status->id; $reply->in_reply_to_profile_id = $status->profile_id; $reply->scope = $scope; diff --git a/app/Http/Controllers/ComposeController.php b/app/Http/Controllers/ComposeController.php index 2069e2693..4e65339c3 100644 --- a/app/Http/Controllers/ComposeController.php +++ b/app/Http/Controllers/ComposeController.php @@ -570,7 +570,7 @@ class ComposeController extends Controller $status->cw_summary = $request->input('spoiler_text'); } - $defaultCaption = config_cache('database.default') === 'mysql' ? null : ""; + $defaultCaption = ""; $status->caption = strip_tags($request->input('caption')) ?? $defaultCaption; $status->rendered = $defaultCaption; $status->scope = 'draft'; diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index bda1f4043..ef77a3bd4 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -689,7 +689,7 @@ class Helpers return $option['replies']['totalItems'] ?? 0; })->toArray(); - $defaultCaption = config_cache('database.default') === 'mysql' ? null : ""; + $defaultCaption = ""; $status = new Status; $status->profile_id = $profile->id; $status->url = isset($res['url']) ? $res['url'] : $url;