mod_pep: Rename variables to avoid name clash [luacheck]
authorKim Alvefur <zash@zash.se>
Fri, 06 Jul 2018 00:04:26 +0200
changeset 8969 9106e9286203
parent 8968 1cc5ea1df5ba
child 8970 c809f334363c
mod_pep: Rename variables to avoid name clash [luacheck]
plugins/mod_pep.lua
--- a/plugins/mod_pep.lua	Fri Jul 06 00:04:13 2018 +0200
+++ b/plugins/mod_pep.lua	Fri Jul 06 00:04:26 2018 +0200
@@ -207,20 +207,20 @@
 			if node and user_data and user_data[node] then -- Send the last item
 				local id, item = unpack(user_data[node]);
 				if not requested_id or id == requested_id then
-					local stanza = st.reply(stanza)
+					local reply_stanza = st.reply(stanza)
 						:tag('pubsub', {xmlns='http://jabber.org/protocol/pubsub'})
 							:tag('items', {node=node})
 								:add_child(item)
 							:up()
 						:up();
-					session.send(stanza);
+					session.send(reply_stanza);
 					return true;
 				else -- requested item doesn't exist
-					local stanza = st.reply(stanza)
+					local reply_stanza = st.reply(stanza)
 						:tag('pubsub', {xmlns='http://jabber.org/protocol/pubsub'})
 							:tag('items', {node=node})
 						:up();
-					session.send(stanza);
+					session.send(reply_stanza);
 					return true;
 				end
 			elseif node then -- node doesn't exist