diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-08-06 11:25:31 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-08-06 11:25:31 +0100 |
commit | 3672f78750854a3ad33d6cbb0cfcc0173d3df086 (patch) | |
tree | 80104daa987fae4cb76043e2b79f260005f00f05 /plugins/mod_pubsub/pubsub.lib.lua | |
parent | 3d23876d124d9c637a127f4a43d9b7ea477f9ba5 (diff) | |
download | prosody-3672f78750854a3ad33d6cbb0cfcc0173d3df086.tar.gz prosody-3672f78750854a3ad33d6cbb0cfcc0173d3df086.zip |
pubsub.lib: Enable publish-options unconditionally
Diffstat (limited to 'plugins/mod_pubsub/pubsub.lib.lua')
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index a7b469d5..aad78235 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -12,8 +12,6 @@ local xmlns_pubsub = "http://jabber.org/protocol/pubsub"; local xmlns_pubsub_errors = "http://jabber.org/protocol/pubsub#errors"; local xmlns_pubsub_owner = "http://jabber.org/protocol/pubsub#owner"; -local enable_publish_options = module:get_option_boolean("enable_publish_options", true); - local _M = {}; local handlers = {}; @@ -198,7 +196,7 @@ local service_method_feature_map = { get_items = { "retrieve-items" }; get_subscriptions = { "retrieve-subscriptions" }; node_defaults = { "retrieve-default" }; - publish = { "publish", "multi-items", enable_publish_options and "publish-options" or nil }; + publish = { "publish", "multi-items", "publish-options" }; purge = { "purge-nodes" }; retract = { "delete-items", "retract-items" }; set_node_config = { "config-node" }; @@ -563,7 +561,7 @@ function handlers.set_publish(origin, stanza, publish, service) return true; end local publish_options = stanza.tags[1]:get_child("publish-options"); - if enable_publish_options and publish_options then + if publish_options then -- Ensure that the node configuration matches the values in publish-options local publish_options_form = publish_options:get_child("x", "jabber:x:data"); local required_config = config_from_xep0060(node_config_form:data(publish_options_form), true); |