aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub/pubsub.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-26 19:34:35 +0200
committerKim Alvefur <zash@zash.se>2018-06-26 19:34:35 +0200
commita0562991c4e2f94987b1c451099dacc38b1b620d (patch)
tree479873e79e0e3bc8e95cee7d3fbcfa489b378ffb /plugins/mod_pubsub/pubsub.lib.lua
parentdb95257fa21e403d04719e2dc0b9478b426a7c13 (diff)
downloadprosody-a0562991c4e2f94987b1c451099dacc38b1b620d.tar.gz
prosody-a0562991c4e2f94987b1c451099dacc38b1b620d.zip
mod_pubsub: Retrieve the node object
Diffstat (limited to 'plugins/mod_pubsub/pubsub.lib.lua')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index b030abbd..a43161c4 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -465,6 +465,12 @@ function handlers.owner_get_affiliations(origin, stanza, affiliations, service)
return true;
end
+ local node_obj = service.nodes[node];
+ if not node_obj then
+ origin.send(pubsub_error_reply(stanza, "item-not-found"));
+ return true;
+ end
+
local reply = st.reply(stanza)
:tag("pubsub", { xmlns = xmlns_pubsub_owner })
:tag("affiliations", { node = node });