# HG changeset patch # User Kim Alvefur # Date 1527092136 -7200 # Node ID d614003a82c1ea9390fc8e841b0c009582a4e96a # Parent 7270258fec77672893e0f13c8aa7d9f95f15842e mod_pubsub: Add support for parsing subscription options form (no options supported yet) This was actually to silence luacheck warnings options andoptions_tag variables. diff -r 7270258fec77 -r d614003a82c1 plugins/mod_pubsub/pubsub.lib.lua --- a/plugins/mod_pubsub/pubsub.lib.lua Wed May 23 18:06:49 2018 +0200 +++ b/plugins/mod_pubsub/pubsub.lib.lua Wed May 23 18:15:36 2018 +0200 @@ -68,6 +68,15 @@ }; }; +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 @@ 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