Software /
code /
prosody
Changeset
5970:6a2c3293d4d7
mod_pubsub: Don't sent error replies from service disco events, let mod_disco handle that
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 30 Dec 2013 21:49:17 +0100 |
parents | 5969:0a3b8003ac9c |
children | 5971:637731f0b9a3 |
files | plugins/mod_pubsub/mod_pubsub.lua |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua Wed Dec 25 22:37:52 2013 +0100 +++ b/plugins/mod_pubsub/mod_pubsub.lua Mon Dec 30 21:49:17 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, item in pairs(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();