diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 71900416..3e29bc10 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -280,7 +280,8 @@ function _M.handle_disco_info_node(event, service) local ok, ret = service:get_nodes(stanza.attr.from); local node_obj = ret[node]; if not ok or not node_obj then - return; + event.origin.send(pubsub_error_reply(stanza, ret or "item-not-found")); + return true; end event.exists = true; reply:tag("identity", { category = "pubsub", type = "leaf" }):up(); @@ -299,7 +300,8 @@ function _M.handle_disco_items_node(event, service) local stanza, reply, node = event.stanza, event.reply, event.node; local ok, ret = service:get_items(node, stanza.attr.from); if not ok then - return; + event.origin.send(pubsub_error_reply(stanza, ret)); + return true; end for _, id in ipairs(ret) do |