From 41525e07d879e4215b5385e7204b15ab52c5feb4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 24 Feb 2019 23:28:35 -0700 Subject: [PATCH] Update PublicApiController --- app/Http/Controllers/PublicApiController.php | 32 ++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index 2ff955bd0..210c32add 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -266,7 +266,21 @@ class PublicApiController extends Controller ->limit($limit) ->get(); } else { - $timeline = Status::whereHas('media') + $timeline = Status::select( + 'id', + 'uri', + 'caption', + 'rendered', + 'profile_id', + 'type', + 'in_reply_to_id', + 'reblog_of_id', + 'is_nsfw', + 'scope', + 'local', + 'created_at', + 'updated_at' + )->whereHas('media') ->whereLocal(true) ->whereNull('uri') ->whereNotIn('profile_id', $filtered) @@ -355,7 +369,21 @@ class PublicApiController extends Controller ->limit($limit) ->get(); } else { - $timeline = Status::whereHas('media') + $timeline = Status::select( + 'id', + 'uri', + 'caption', + 'rendered', + 'profile_id', + 'type', + 'in_reply_to_id', + 'reblog_of_id', + 'is_nsfw', + 'scope', + 'local', + 'created_at', + 'updated_at' + )->whereHas('media') ->whereLocal(true) ->whereNull('uri') ->whereIn('profile_id', $following)