Changeset

8826:d614003a82c1

mod_pubsub: Add support for parsing subscription options form (no options supported yet) This was actually to silence luacheck warnings options andoptions_tag variables.
author Kim Alvefur <zash@zash.se>
date Wed, 23 May 2018 18:15:36 +0200
parents 8825:7270258fec77
children 8828:2a0d7fa4c56a
files plugins/mod_pubsub/pubsub.lib.lua
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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