diff options
author | Kim Alvefur <zash@zash.se> | 2018-06-26 19:34:35 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-06-26 19:34:35 +0200 |
commit | 359a86ca08233d3b445dc9a342b7377eaa5a697d (patch) | |
tree | 479873e79e0e3bc8e95cee7d3fbcfa489b378ffb /plugins | |
parent | bddb37e08b18f8f860bfa3cf77054deb1ce00e6d (diff) | |
download | prosody-359a86ca08233d3b445dc9a342b7377eaa5a697d.tar.gz prosody-359a86ca08233d3b445dc9a342b7377eaa5a697d.zip |
mod_pubsub: Retrieve the node object
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 6 |
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 }); |