From 623e0c9adb1d988aab44173b604e8cdcbf4f60e1 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 8 Jul 2019 22:40:54 -0600 Subject: [PATCH] Update StatusHashtagService --- app/Services/StatusHashtagService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Services/StatusHashtagService.php b/app/Services/StatusHashtagService.php index d9249b9f0..7c5ed87bb 100644 --- a/app/Services/StatusHashtagService.php +++ b/app/Services/StatusHashtagService.php @@ -16,6 +16,7 @@ class StatusHashtagService { public static function get($id, $page = 1, $stop = 9) { return StatusHashtag::whereHashtagId($id) + ->whereStatusVisibility('public') ->whereHas('media') ->skip($stop) ->latest() @@ -31,6 +32,7 @@ class StatusHashtagService { { $stop = $stop > 2000 ? 2000 : $stop; $ids = StatusHashtag::whereHashtagId($id) + ->whereStatusVisibility('public') ->whereHas('media') ->latest() ->skip($start) @@ -65,6 +67,7 @@ class StatusHashtagService { { return Cache::remember('pf:services:status-hashtag:post:'.$statusId.':hashtag:'.$hashtagId, now()->addMonths(3), function() use($statusId, $hashtagId) { $statusHashtag = StatusHashtag::with('profile', 'status', 'hashtag') + ->whereStatusVisibility('public') ->whereStatusId($statusId) ->whereHashtagId($hashtagId) ->first();