From 3829ac306eaf47e5f056cbe9acbdb81cc60e95ef Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 6 Mar 2017 15:09:22 +0100 Subject: mod_adhoc/adhoc.lib: instantiate table with all fields --- plugins/adhoc/adhoc.lib.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/adhoc/adhoc.lib.lua b/plugins/adhoc/adhoc.lib.lua index 5c90c91b..87415636 100644 --- a/plugins/adhoc/adhoc.lib.lua +++ b/plugins/adhoc/adhoc.lib.lua @@ -27,11 +27,12 @@ end 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; -- cgit v1.2.3