From 671fdec8d0a092ccceb5d4d5f657d0f4287fc4c7 Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Wed, 19 Dec 2018 15:07:32 +0100 Subject: [PATCH] fixes #1695, post comment count is incorrectly calculated based on all posts, including events --- src/User/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/User/User.php b/src/User/User.php index 3fc2f2110..45c248059 100644 --- a/src/User/User.php +++ b/src/User/User.php @@ -753,7 +753,7 @@ class User extends AbstractModel */ public function refreshCommentCount() { - $this->comment_count = $this->posts()->count(); + $this->comment_count = $this->posts()->where('type', 'comment')->count(); return $this; }