mirror of
https://github.com/flarum/framework.git
synced 2024-11-27 19:13:37 +08:00
fixes #1695, post comment count is incorrectly calculated based on all posts, including events
This commit is contained in:
parent
9eca9192ca
commit
671fdec8d0
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user