mod_adhoc/adhoc.lib: Rename variable to avoid name clash [luacheck]
authorKim Alvefur <zash@zash.se>
Tue, 05 Dec 2017 12:32:25 +0100
changeset 8462 84c117cdd048
parent 8461 e9c7ac97cb52
child 8463 77e59f8057bf
mod_adhoc/adhoc.lib: Rename variable to avoid name clash [luacheck]
plugins/adhoc/adhoc.lib.lua
--- a/plugins/adhoc/adhoc.lib.lua	Tue Dec 05 12:30:13 2017 +0100
+++ b/plugins/adhoc/adhoc.lib.lua	Tue Dec 05 12:32:25 2017 +0100
@@ -25,13 +25,13 @@
 end
 
 function _M.handle_cmd(command, origin, stanza)
-	local cmdtag = stanza.tags[1]
-	local sessionid = cmdtag.attr.sessionid or uuid.generate();
+	local command = stanza.tags[1];
+	local sessionid = command.attr.sessionid or uuid.generate();
 	local dataIn = {
 		to = stanza.attr.to;
 		from = stanza.attr.from;
-		action = cmdtag.attr.action or "execute";
-		form = cmdtag:get_child("x", "jabber:x:data");
+		action = command.attr.action or "execute";
+		form = command:get_child("x", "jabber:x:data");
 	};
 
 	local data, state = command:handler(dataIn, states[sessionid]);