1
0
mirror of https://github.com/flarum/core.git synced 2025-07-20 08:11:27 +02:00

fixes #1695, post comment count is incorrectly calculated based on all posts, including events

This commit is contained in:
Daniel Klabbers
2018-12-19 15:07:32 +01:00
parent f1c672e12d
commit 80c6efa1e8

View File

@@ -753,7 +753,7 @@ class User extends AbstractModel
*/ */
public function refreshCommentCount() public function refreshCommentCount()
{ {
$this->comment_count = $this->posts()->count(); $this->comment_count = $this->posts()->where('type', 'comment')->count();
return $this; return $this;
} }