# HG changeset patch # User Kim Alvefur # Date 1513097370 -3600 # Node ID a6f58305411e618a8441b37e690d3e66c6d07745 # Parent 81f894d08b17af44336ee1f182319537356b8d45 Backed out changeset 84c117cdd048, broke things diff -r 81f894d08b17 -r a6f58305411e plugins/adhoc/adhoc.lib.lua --- a/plugins/adhoc/adhoc.lib.lua Mon Dec 11 22:45:03 2017 +0100 +++ b/plugins/adhoc/adhoc.lib.lua Tue Dec 12 17:49:30 2017 +0100 @@ -25,13 +25,13 @@ 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]);