aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-12-31 19:09:34 +0100
committerKim Alvefur <zash@zash.se>2013-12-31 19:09:34 +0100
commit667f75150d48db1815d8566228a41e9290fe163e (patch)
tree1bd9bf4c41dcfba42c26fece5df37138185b774f /plugins/mod_pubsub
parent195743afe083f3b66a4fa2cd594e75f150e81968 (diff)
parentc9a6cd1b3365ffb0676f542cc81ddecd4b46dbd0 (diff)
downloadprosody-667f75150d48db1815d8566228a41e9290fe163e.tar.gz
prosody-667f75150d48db1815d8566228a41e9290fe163e.zip
Merge 0.10->trunk and Happy New Year!
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r--plugins/mod_pubsub/mod_pubsub.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua
index 2868d409..33e729af 100644
--- a/plugins/mod_pubsub/mod_pubsub.lua
+++ b/plugins/mod_pubsub/mod_pubsub.lua
@@ -86,12 +86,9 @@ end
module:hook("host-disco-info-node", function (event)
local stanza, origin, reply, node = event.stanza, event.origin, event.reply, event.node;
local ok, ret = service:get_nodes(stanza.attr.from);
- if ok and not ret[node] then
+ if not ok or not ret[node] then
return;
end
- if not ok then
- return origin.send(pubsub_error_reply(stanza, ret));
- end
event.exists = true;
reply:tag("identity", { category = "pubsub", type = "leaf" });
end);
@@ -100,7 +97,7 @@ module:hook("host-disco-items-node", function (event)
local stanza, origin, reply, node = event.stanza, event.origin, event.reply, event.node;
local ok, ret = service:get_items(node, stanza.attr.from);
if not ok then
- return origin.send(pubsub_error_reply(stanza, ret));
+ return;
end
for _, id in ipairs(ret) do
@@ -114,7 +111,7 @@ module:hook("host-disco-items", function (event)
local stanza, origin, reply = event.stanza, event.origin, event.reply;
local ok, ret = service:get_nodes(event.stanza.attr.from);
if not ok then
- return origin.send(pubsub_error_reply(event.stanza, ret));
+ return;
end
for node, node_obj in pairs(ret) do
reply:tag("item", { jid = module.host, node = node, name = node_obj.config.name }):up();