mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
DEV: Added wrapper to signal that NewPostManager#add_plugin_payload_attribute is part of the public API
This commit is contained in:
parent
98fbc019a3
commit
1e89939383
2 changed files with 7 additions and 1 deletions
|
@ -730,6 +730,12 @@ class Plugin::Instance
|
|||
end
|
||||
end
|
||||
|
||||
def allow_new_queued_post_payload_attribute(attribute_name)
|
||||
reloadable_patch do
|
||||
NewPostManager.add_plugin_payload_attribute(attribute_name)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def write_asset(path, contents)
|
||||
|
|
|
@ -402,7 +402,7 @@ after_initialize do
|
|||
true
|
||||
end
|
||||
|
||||
NewPostManager.add_plugin_payload_attribute("is_poll")
|
||||
allow_new_queued_post_payload_attribute("is_poll")
|
||||
|
||||
NewPostManager.add_handler(1) do |manager|
|
||||
post = Post.new(raw: manager.args[:raw])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue