From 84ba7f4a9c6139e17187de8e66d9d7cb4fc4264a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 31 Aug 2018 19:50:37 -0600 Subject: [PATCH] Update timeline logic to filter non public posts --- app/Http/Controllers/SiteController.php | 1 + app/Http/Controllers/TimelineController.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Http/Controllers/SiteController.php b/app/Http/Controllers/SiteController.php index de6e0c874..0a38f30b0 100644 --- a/app/Http/Controllers/SiteController.php +++ b/app/Http/Controllers/SiteController.php @@ -42,6 +42,7 @@ class SiteController extends Controller $timeline = Status::whereIn('profile_id', $following) ->whereNotIn('profile_id', $filtered) ->whereHas('media') + ->whereVisibility('public') ->orderBy('id', 'desc') ->withCount(['comments', 'likes', 'shares']) ->simplePaginate(20); diff --git a/app/Http/Controllers/TimelineController.php b/app/Http/Controllers/TimelineController.php index 4ccb78709..77b64b3b5 100644 --- a/app/Http/Controllers/TimelineController.php +++ b/app/Http/Controllers/TimelineController.php @@ -52,6 +52,7 @@ class TimelineController extends Controller ->whereNotIn('profile_id', $filtered) ->whereNull('in_reply_to_id') ->whereNull('reblog_of_id') + ->whereVisibility('public') ->withCount(['comments', 'likes']) ->orderBy('id', 'desc') ->simplePaginate(20);