2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: correct counts on user summary

This commit is contained in:
Sam 2016-01-24 16:39:01 +11:00
parent 4b8e12d138
commit d0ee32f3ce
5 changed files with 43 additions and 6 deletions

View file

@ -354,8 +354,10 @@ class PostCreator
@user.user_stat.first_post_created_at = @post.created_at
end
@user.user_stat.post_count += 1
@user.user_stat.topic_count += 1 if @post.is_first_post?
unless @post.topic.private_message?
@user.user_stat.post_count += 1
@user.user_stat.topic_count += 1 if @post.is_first_post?
end
# We don't count replies to your own topics
if !@opts[:import_mode] && @user.id != @topic.user_id