mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
DEV: Replace magic values (#8398)
Follow-up to 35942f7c7c9510161c42018543ac609254dafdbd.
This commit is contained in:
@ -478,8 +478,8 @@ class PostsController < ApplicationController
|
||||
post = find_post_from_params
|
||||
|
||||
if params[:notice].present?
|
||||
post.custom_fields["notice_type"] = Post.notices[:custom]
|
||||
post.custom_fields["notice_args"] = PrettyText.cook(params[:notice], features: { onebox: false })
|
||||
post.custom_fields[Post::NOTICE_TYPE] = Post.notices[:custom]
|
||||
post.custom_fields[Post::NOTICE_ARGS] = PrettyText.cook(params[:notice], features: { onebox: false })
|
||||
post.save_custom_fields
|
||||
else
|
||||
post.delete_post_notices
|
||||
|
Reference in New Issue
Block a user