Skip to content

Commit

Permalink
fix: approving a post does not bump user comment_count (#3790)
Browse files Browse the repository at this point in the history
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
  • Loading branch information
SychO9 authored Apr 16, 2023
1 parent 6c1283a commit 6538996
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Listener/UpdateDiscussionAfterPostApproval.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,10 @@ public function handle(PostWasApproved $event)
$user->refreshCommentCount();
$user->save();
}

if ($post->user) {
$post->user->refreshCommentCount();
$post->user->save();
}
}
}

0 comments on commit 6538996

Please sign in to comment.