Changeset

9116:9f36f5c14545

mod_pubsub: Rename variable subscription options form to improve readability "options_form" ... options for what?
author Kim Alvefur <zash@zash.se>
date Sun, 05 Aug 2018 02:01:58 +0200
parents 9115:fddebfaae7d9
children 9117:a19fdc6e4f09 9123:5d5aa1c4fe34
files plugins/mod_pubsub/pubsub.lib.lua
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua	Sun Aug 05 00:08:07 2018 +0100
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Sun Aug 05 02:01:58 2018 +0200
@@ -95,7 +95,7 @@
 	};
 };
 
-local options_form = dataform {
+local subscribe_options_form = dataform {
 	{
 		type = "hidden";
 		name = "FORM_TYPE";
@@ -453,7 +453,7 @@
 	end
 	local options_tag, options = stanza.tags[1]:get_child("options"), nil;
 	if options_tag then
-		options = options_form:data(options_tag.tags[1]);
+		options = subscribe_options_form:data(options_tag.tags[1]);
 	end
 	local ok, ret = service:add_subscription(node, stanza.attr.from, jid, options);
 	local reply;
@@ -508,7 +508,7 @@
 	origin.send(st.reply(stanza)
 		:tag("pubsub", { xmlns = xmlns_pubsub })
 			:tag("options", { node = node, jid = jid })
-				:add_child(options_form:form(ret)));
+				:add_child(subscribe_options_form:form(ret)));
 	return true;
 end
 
@@ -527,7 +527,7 @@
 		origin.send(pubsub_error_reply(stanza, "not-subscribed"));
 		return true;
 	end
-	local new_subopts, err = options_form:data(options.tags[1]);
+	local new_subopts, err = subscribe_options_form:data(options.tags[1]);
 	if not new_subopts then
 		origin.send(pubsub_error_reply(stanza, ret));
 		return true;