aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commitbe2d5e7266de46093a08f7ff736749a77607425f (patch)
tree542c179a37fac2d1e87b318c8404caf453c8363d /plugins
parent8210fb1e86489614e56197a5c18b3a796910ed5f (diff)
downloadprosody-be2d5e7266de46093a08f7ff736749a77607425f.tar.gz
prosody-be2d5e7266de46093a08f7ff736749a77607425f.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')
-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