aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-06 15:09:22 +0100
committerKim Alvefur <zash@zash.se>2017-03-06 15:09:22 +0100
commit09aa194994afb54163ea52ed406da19aaf884221 (patch)
treeb82c0588c6334026e1a16377ae9e7417ad8d9c79
parent91d2b2518f3e3d047dc43f59db3f7025d29ab86c (diff)
downloadprosody-09aa194994afb54163ea52ed406da19aaf884221.tar.gz
prosody-09aa194994afb54163ea52ed406da19aaf884221.zip
mod_adhoc/adhoc.lib: instantiate table with all fields
-rw-r--r--plugins/adhoc/adhoc.lib.lua11
1 files 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;