--- 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]);