aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_disco.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-01 22:38:02 +0200
committerKim Alvefur <zash@zash.se>2017-04-01 22:38:02 +0200
commitc27589b44c5312d9119d0152ed4dcf1b5492414c (patch)
tree54caf551ee6f37067537da4cfe6cdd84050f92a0 /plugins/mod_disco.lua
parent2364604bc18ed52d599160a169a465d85a20a0c6 (diff)
parent3e4952567c828aa7a475fa9bcc48f794d92fdf2c (diff)
downloadprosody-c27589b44c5312d9119d0152ed4dcf1b5492414c.tar.gz
prosody-c27589b44c5312d9119d0152ed4dcf1b5492414c.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_disco.lua')
-rw-r--r--plugins/mod_disco.lua24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/mod_disco.lua b/plugins/mod_disco.lua
index 250252c0..b135d46d 100644
--- a/plugins/mod_disco.lua
+++ b/plugins/mod_disco.lua
@@ -101,10 +101,10 @@ module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(even
local node = stanza.tags[1].attr.node;
if node and node ~= "" and node ~= "http://prosody.im#"..get_server_caps_hash() then
local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#info', node=node});
- local event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
- local ret = module:fire_event("host-disco-info-node", event);
+ local node_event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
+ local ret = module:fire_event("host-disco-info-node", node_event);
if ret ~= nil then return ret; end
- if event.exists then
+ if node_event.exists then
origin.send(reply);
else
origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Node does not exist"));
@@ -123,10 +123,10 @@ module:hook("iq/host/http://jabber.org/protocol/disco#items:query", function(eve
local node = stanza.tags[1].attr.node;
if node and node ~= "" then
local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#items', node=node});
- local event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
- local ret = module:fire_event("host-disco-items-node", event);
+ local node_event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
+ local ret = module:fire_event("host-disco-items-node", node_event);
if ret ~= nil then return ret; end
- if event.exists then
+ if node_event.exists then
origin.send(reply);
else
origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Node does not exist"));
@@ -163,10 +163,10 @@ module:hook("iq/bare/http://jabber.org/protocol/disco#info:query", function(even
if node and node ~= "" then
local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#info', node=node});
if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account
- local event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
- local ret = module:fire_event("account-disco-info-node", event);
+ local node_event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
+ local ret = module:fire_event("account-disco-info-node", node_event);
if ret ~= nil then return ret; end
- if event.exists then
+ if node_event.exists then
origin.send(reply);
else
origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Node does not exist"));
@@ -189,10 +189,10 @@ module:hook("iq/bare/http://jabber.org/protocol/disco#items:query", function(eve
if node and node ~= "" then
local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#items', node=node});
if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account
- local event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
- local ret = module:fire_event("account-disco-items-node", event);
+ local node_event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
+ local ret = module:fire_event("account-disco-items-node", node_event);
if ret ~= nil then return ret; end
- if event.exists then
+ if node_event.exists then
origin.send(reply);
else
origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Node does not exist"));