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
commit359a86ca08233d3b445dc9a342b7377eaa5a697d (patch)
tree479873e79e0e3bc8e95cee7d3fbcfa489b378ffb /plugins/mod_pubsub/pubsub.lib.lua
parentbddb37e08b18f8f860bfa3cf77054deb1ce00e6d (diff)
downloadprosody-359a86ca08233d3b445dc9a342b7377eaa5a697d.tar.gz
prosody-359a86ca08233d3b445dc9a342b7377eaa5a697d.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 });