From ce98e4155bda80a818a301b8017c58a968b468e3 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 24 Mar 2015 15:07:11 +1030 Subject: [PATCH] Only show comment posts in activity feed --- .../core/src/Core/Repositories/EloquentActivityRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Core/Repositories/EloquentActivityRepository.php b/framework/core/src/Core/Repositories/EloquentActivityRepository.php index e4eefd379..0d1fde3f5 100644 --- a/framework/core/src/Core/Repositories/EloquentActivityRepository.php +++ b/framework/core/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); + $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'); if ($type === 'post') { $posts->where('number', '>', 1);