diff options
author | Matthew Wild <mwild1@gmail.com> | 2014-01-12 06:19:55 -0500 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2014-01-12 06:19:55 -0500 |
commit | 6a177d7ad6517cd53943c4e03d2bac578d251108 (patch) | |
tree | 4cd51fee2c707c44a8bb6517c5b332a152c99711 /plugins/mod_pubsub/mod_pubsub.lua | |
parent | e60a10abca1ce15ed341a72aaf1f8a3b7c3bf485 (diff) | |
parent | c1ce22bc823d01a478cc2babbcf303d89e4ee4da (diff) | |
download | prosody-6a177d7ad6517cd53943c4e03d2bac578d251108.tar.gz prosody-6a177d7ad6517cd53943c4e03d2bac578d251108.zip |
Merge
Diffstat (limited to 'plugins/mod_pubsub/mod_pubsub.lua')
-rw-r--r-- | plugins/mod_pubsub/mod_pubsub.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua index 81a66f8b..c6dbe831 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, item in pairs(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(); |