DEV: Replace magic values (#8398)

Follow-up to 35942f7c7c9510161c42018543ac609254dafdbd.
This commit is contained in:
Dan Ungureanu
2019-11-25 14:32:19 +02:00
committed by GitHub
parent ae9e881333
commit a992caf741
10 changed files with 38 additions and 33 deletions

View File

@ -550,10 +550,10 @@ class PostCreator
.first
if !last_post_time
@post.custom_fields["notice_type"] = Post.notices[:new_user]
@post.custom_fields[Post::NOTICE_TYPE] = Post.notices[:new_user]
elsif SiteSetting.returning_users_days > 0 && last_post_time < SiteSetting.returning_users_days.days.ago
@post.custom_fields["notice_type"] = Post.notices[:returning_user]
@post.custom_fields["notice_args"] = last_post_time.iso8601
@post.custom_fields[Post::NOTICE_TYPE] = Post.notices[:returning_user]
@post.custom_fields[Post::NOTICE_ARGS] = last_post_time.iso8601
end
end