mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Replace magic values (#8398)
Follow-up to 35942f7c7c9510161c42018543ac609254dafdbd.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user