mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 05:53:37 +08:00
Only show comment posts in activity feed
This commit is contained in:
parent
ecba7fb3d3
commit
ce98e4155b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user