Software /
code /
prosody
Diff
plugins/mod_pubsub/pubsub.lib.lua @ 8934:365bcf899093
mod_pubsub: Retrieve the node object
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 26 Jun 2018 19:34:35 +0200 |
parent | 8933:6d3ecf9e8277 |
child | 8935:a825ef6de45a |
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua Tue Jun 26 19:30:28 2018 +0200 +++ b/plugins/mod_pubsub/pubsub.lib.lua Tue Jun 26 19:34:35 2018 +0200 @@ -465,6 +465,12 @@ 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 });