aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-05-23 18:15:36 +0200
committerKim Alvefur <zash@zash.se>2018-05-23 18:15:36 +0200
commitb531286f23283fb3315aa53778de3b618d33641d (patch)
tree542c179a37fac2d1e87b318c8404caf453c8363d /plugins/mod_pubsub
parent476b66f14df01c43eb45397577e37e43308656e5 (diff)
downloadprosody-b531286f23283fb3315aa53778de3b618d33641d.tar.gz
prosody-b531286f23283fb3315aa53778de3b618d33641d.zip
mod_pubsub: Add support for parsing subscription options form (no options supported yet)
This was actually to silence luacheck warnings options andoptions_tag variables.
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index 4aba6203..1ffe45d3 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -68,6 +68,15 @@ local node_config_form = dataform {
};
};
+local options_form = dataform {
+ {
+ type = "hidden";
+ name = "FORM_TYPE";
+ value = "http://jabber.org/protocol/pubsub#subscribe_options";
+ }
+ -- No options yet. File a feature request ;)
+};
+
local service_method_feature_map = {
add_subscription = { "subscribe" };
create = { "create-nodes", "instant-nodes", "item-ids", "create-and-configure" };
@@ -253,13 +262,10 @@ function handlers.set_subscribe(origin, stanza, subscribe, service)
origin.send(pubsub_error_reply(stanza, jid and "nodeid-required" or "invalid-jid"));
return true;
end
- --[[
local options_tag, options = stanza.tags[1]:get_child("options"), nil;
if options_tag then
options = options_form:data(options_tag.tags[1]);
end
- --]]
- local options_tag, options; -- FIXME
local ok, ret = service:add_subscription(node, stanza.attr.from, jid, options);
local reply;
if ok then