Software /
code /
prosody
Diff
plugins/adhoc/adhoc.lib.lua @ 8459:84c117cdd048
mod_adhoc/adhoc.lib: Rename variable to avoid name clash [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 05 Dec 2017 12:32:25 +0100 |
parent | 7951:2b91da49285a |
child | 8471:a6f58305411e |
line wrap: on
line diff
--- a/plugins/adhoc/adhoc.lib.lua Tue Dec 05 12:30:13 2017 +0100 +++ b/plugins/adhoc/adhoc.lib.lua Tue Dec 05 12:32:25 2017 +0100 @@ -25,13 +25,13 @@ end function _M.handle_cmd(command, origin, stanza) - local cmdtag = stanza.tags[1] - local sessionid = cmdtag.attr.sessionid or uuid.generate(); + local command = stanza.tags[1]; + local sessionid = command.attr.sessionid or uuid.generate(); local dataIn = { to = stanza.attr.to; from = stanza.attr.from; - action = cmdtag.attr.action or "execute"; - form = cmdtag:get_child("x", "jabber:x:data"); + action = command.attr.action or "execute"; + form = command:get_child("x", "jabber:x:data"); }; local data, state = command:handler(dataIn, states[sessionid]);