aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-08-06 11:25:31 +0100
committerMatthew Wild <mwild1@gmail.com>2018-08-06 11:25:31 +0100
commite657c53e5a8b887f1ba45357ef0341e7abc064e7 (patch)
tree80104daa987fae4cb76043e2b79f260005f00f05
parent7ea43e66072912ef6cbec097985d715ef462c900 (diff)
downloadprosody-e657c53e5a8b887f1ba45357ef0341e7abc064e7.tar.gz
prosody-e657c53e5a8b887f1ba45357ef0341e7abc064e7.zip
pubsub.lib: Enable publish-options unconditionally
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua6
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);