# HG changeset patch # User Kim Alvefur # Date 1530034475 -7200 # Node ID 365bcf8990937e43f0ebeb61b90645a8e9261207 # Parent 6d3ecf9e8277832f34acec3696fa7acb79eb630e mod_pubsub: Retrieve the node object diff -r 6d3ecf9e8277 -r 365bcf899093 plugins/mod_pubsub/pubsub.lib.lua --- 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 });