# HG changeset patch # User Kim Alvefur # Date 1488809362 -3600 # Node ID 2b91da49285a53b8d4d080bdf985c3fa110b10e0 # Parent 8acc35b5355ab820b3d884a3a66ef99c8854652c mod_adhoc/adhoc.lib: instantiate table with all fields diff -r 8acc35b5355a -r 2b91da49285a plugins/adhoc/adhoc.lib.lua --- a/plugins/adhoc/adhoc.lib.lua Sat Mar 04 20:09:28 2017 +0100 +++ b/plugins/adhoc/adhoc.lib.lua Mon Mar 06 15:09:22 2017 +0100 @@ -27,11 +27,12 @@ function _M.handle_cmd(command, origin, stanza) local cmdtag = stanza.tags[1] local sessionid = cmdtag.attr.sessionid or uuid.generate(); - local dataIn = {}; - dataIn.to = stanza.attr.to; - dataIn.from = stanza.attr.from; - dataIn.action = cmdtag.attr.action or "execute"; - dataIn.form = cmdtag:get_child("x", "jabber:x:data"); + local dataIn = { + to = stanza.attr.to; + from = stanza.attr.from; + action = cmdtag.attr.action or "execute"; + form = cmdtag:get_child("x", "jabber:x:data"); + }; local data, state = command:handler(dataIn, states[sessionid]); states[sessionid] = state;