From e3c425e22275883f024659b064703221700afec8 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 19:19:41 -0600 Subject: [PATCH] Update PublicApiController --- app/Http/Controllers/PublicApiController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index e49174b36..2a9610a92 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -457,10 +457,11 @@ class PublicApiController extends Controller )->where('id', $dir, $id) ->whereIn('type', ['photo', 'photo:album', 'video', 'video:album']) ->whereNotIn('profile_id', $filtered) + ->whereNotNull('uri') ->whereNull('in_reply_to_id') ->whereNull('reblog_of_id') ->whereVisibility('public') - ->orderBy('created_at', 'desc') + ->latest() ->limit($limit) ->get(); } else { @@ -484,8 +485,9 @@ class PublicApiController extends Controller ->whereNotIn('profile_id', $filtered) ->whereNull('in_reply_to_id') ->whereNull('reblog_of_id') + ->whereNotNull('uri') ->whereVisibility('public') - ->orderBy('created_at', 'desc') + ->latest() ->simplePaginate($limit); }