fix: approving a post does not bump user comment_count (#3790)

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
Sami Mazouz
2023-04-16 21:13:57 +01:00
committed by GitHub
parent aa33cfd1f8
commit 94e92cf24e

View File

@ -36,5 +36,10 @@ class UpdateDiscussionAfterPostApproval
$user->refreshCommentCount();
$user->save();
}
if ($post->user) {
$post->user->refreshCommentCount();
$post->user->save();
}
}
}