Skip to content

Commit

Permalink
fixes #1695, post comment count is incorrectly calculated based on al…
Browse files Browse the repository at this point in the history
…l posts, including events
  • Loading branch information
luceos committed Dec 19, 2018
1 parent 9eca919 commit 671fdec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ public static function getNotificationPreferenceKey($type, $method)
*/
public function refreshCommentCount()
{
$this->comment_count = $this->posts()->count();
$this->comment_count = $this->posts()->where('type', 'comment')->count();

return $this;
}
Expand Down

0 comments on commit 671fdec

Please sign in to comment.