From f0121d761a0fe3591b3790bd70674218362c470d Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 8 Sep 2018 20:42:35 -0600 Subject: [PATCH] Update DiscoverController, fixes #445 --- app/Http/Controllers/DiscoverController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DiscoverController.php b/app/Http/Controllers/DiscoverController.php index 1e96cf058..fb3286d87 100644 --- a/app/Http/Controllers/DiscoverController.php +++ b/app/Http/Controllers/DiscoverController.php @@ -23,7 +23,6 @@ class DiscoverController extends Controller $following = Follower::whereProfileId($pid) ->pluck('following_id'); - $filtered = UserFilter::whereUserId($pid) ->whereFilterableType('App\Profile') ->whereIn('filter_type', ['mute', 'block']) @@ -36,10 +35,12 @@ class DiscoverController extends Controller $people = Profile::inRandomOrder() ->whereNotIn('id', $following) + ->whereIsPrivate(false) ->take(3) ->get(); $posts = Status::whereHas('media') + ->whereVisibility('public') ->where('profile_id', '!=', $pid) ->whereNotIn('profile_id', $following) ->orderBy('created_at', 'desc')