DEV: Added wrapper to signal that NewPostManager#add_plugin_payload_attribute is part of the public API

This commit is contained in:
romanrizzi 2019-08-29 11:56:46 -03:00
parent 98fbc019a3
commit 1e89939383
2 changed files with 7 additions and 1 deletions

View File

@ -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)

View File

@ -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])