From 1074d0ebbca7376035020791985c0df70b98b4cf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 12 Dec 2017 17:49:30 +0100 Subject: Backed out changeset 84c117cdd048, broke things --- plugins/adhoc/adhoc.lib.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/adhoc/adhoc.lib.lua b/plugins/adhoc/adhoc.lib.lua index 91806d26..87415636 100644 --- a/plugins/adhoc/adhoc.lib.lua +++ b/plugins/adhoc/adhoc.lib.lua @@ -25,13 +25,13 @@ function _M.new(name, node, handler, permission) end function _M.handle_cmd(command, origin, stanza) - local command = stanza.tags[1]; - local sessionid = command.attr.sessionid or uuid.generate(); + local cmdtag = stanza.tags[1] + local sessionid = cmdtag.attr.sessionid or uuid.generate(); local dataIn = { to = stanza.attr.to; from = stanza.attr.from; - action = command.attr.action or "execute"; - form = command:get_child("x", "jabber:x:data"); + action = cmdtag.attr.action or "execute"; + form = cmdtag:get_child("x", "jabber:x:data"); }; local data, state = command:handler(dataIn, states[sessionid]); -- cgit v1.2.3