Software /
code /
prosody
Comparison
plugins/adhoc/adhoc.lib.lua @ 12429:16a49f04d507
adhoc: Include stanza and origin in adhoc event data
This allows easier access to these, which could be useful for all sorts
of reasons
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 06 Mar 2017 15:19:35 +0100 |
parent | 11351:6b541d3c4c1b |
child | 12642:9061f9621330 |
comparison
equal
deleted
inserted
replaced
12428:ba5bf1d9d9bd | 12429:16a49f04d507 |
---|---|
32 | 32 |
33 function _M.handle_cmd(command, origin, stanza) | 33 function _M.handle_cmd(command, origin, stanza) |
34 local cmdtag = stanza.tags[1] | 34 local cmdtag = stanza.tags[1] |
35 local sessionid = cmdtag.attr.sessionid or uuid.generate(); | 35 local sessionid = cmdtag.attr.sessionid or uuid.generate(); |
36 local dataIn = { | 36 local dataIn = { |
37 origin = origin; | |
38 stanza = stanza; | |
37 to = stanza.attr.to; | 39 to = stanza.attr.to; |
38 from = stanza.attr.from; | 40 from = stanza.attr.from; |
39 action = cmdtag.attr.action or "execute"; | 41 action = cmdtag.attr.action or "execute"; |
40 form = cmdtag:get_child("x", "jabber:x:data"); | 42 form = cmdtag:get_child("x", "jabber:x:data"); |
41 }; | 43 }; |