Software /
code /
prosody
Diff
plugins/mod_pubsub/mod_pubsub.lua @ 5973:905b4fd863b4
Merge 0.10->trunk and Happy New Year!
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 31 Dec 2013 19:09:34 +0100 |
parent | 5851:cdcfd93e2f43 |
parent | 5970:6a2c3293d4d7 |
child | 6442:0f4025abbe8f |
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua Mon Dec 23 23:23:59 2013 +0100 +++ b/plugins/mod_pubsub/mod_pubsub.lua Tue Dec 31 19:09:34 2013 +0100 @@ -86,12 +86,9 @@ 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 @@ 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 @@ 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();