From 8be486a31daebd85744d04ba67e687bcbf4f1afa Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 24 Mar 2015 19:41:30 +1030 Subject: [PATCH] Don't show deleted posts in the activity feed --- src/Core/Repositories/EloquentActivityRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Repositories/EloquentActivityRepository.php b/src/Core/Repositories/EloquentActivityRepository.php index 0d1fde3f5..e027c93d2 100644 --- a/src/Core/Repositories/EloquentActivityRepository.php +++ b/src/Core/Repositories/EloquentActivityRepository.php @@ -17,7 +17,7 @@ class EloquentActivityRepository implements ActivityRepositoryInterface $query->where('type', $type); } - $posts = Post::whereCan($viewer, 'view')->with('post', 'post.discussion', 'post.user', 'post.discussion.startUser', 'post.discussion.lastUser')->select(\DB::raw("CONCAT('post', id)"), 'user_id', $null, \DB::raw("'post'"), $null, 'time', 'id')->where('user_id', $userId)->where('type', 'comment'); + $posts = Post::whereCan($viewer, 'view')->with('post', 'post.discussion', 'post.user', 'post.discussion.startUser', 'post.discussion.lastUser')->select(\DB::raw("CONCAT('post', id)"), 'user_id', $null, \DB::raw("'post'"), $null, 'time', 'id')->where('user_id', $userId)->where('type', 'comment')->whereNull('hide_time'); if ($type === 'post') { $posts->where('number', '>', 1);