diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-05 02:01:58 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-05 02:01:58 +0200 |
commit | d77fe6c4d39d88756c5a126dbc081dd27957b6a4 (patch) | |
tree | bd6eb565878d5ffe4cc7484e386b05af81137c02 /plugins/mod_pubsub/pubsub.lib.lua | |
parent | e339906c4e9e8932a7adaeac387d7a2502f38d39 (diff) | |
download | prosody-d77fe6c4d39d88756c5a126dbc081dd27957b6a4.tar.gz prosody-d77fe6c4d39d88756c5a126dbc081dd27957b6a4.zip |
mod_pubsub: Rename variable subscription options form to improve readability
"options_form" ... options for what?
Diffstat (limited to 'plugins/mod_pubsub/pubsub.lib.lua')
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 7a8ca672..7c796c20 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -95,7 +95,7 @@ local node_config_form = dataform { }; }; -local options_form = dataform { +local subscribe_options_form = dataform { { type = "hidden"; name = "FORM_TYPE"; @@ -453,7 +453,7 @@ function handlers.set_subscribe(origin, stanza, subscribe, service) 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 @@ function handlers.get_options(origin, stanza, options, service) 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 @@ function handlers.set_options(origin, stanza, options, service) 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; |