Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
8933:6d3ecf9e8277 | 8934:365bcf899093 |
---|---|
463 if not service:may(node, stanza.attr.from, "set_affiliation") then | 463 if not service:may(node, stanza.attr.from, "set_affiliation") then |
464 origin.send(pubsub_error_reply(stanza, "forbidden")); | 464 origin.send(pubsub_error_reply(stanza, "forbidden")); |
465 return true; | 465 return true; |
466 end | 466 end |
467 | 467 |
468 local node_obj = service.nodes[node]; | |
469 if not node_obj then | |
470 origin.send(pubsub_error_reply(stanza, "item-not-found")); | |
471 return true; | |
472 end | |
473 | |
468 local reply = st.reply(stanza) | 474 local reply = st.reply(stanza) |
469 :tag("pubsub", { xmlns = xmlns_pubsub_owner }) | 475 :tag("pubsub", { xmlns = xmlns_pubsub_owner }) |
470 :tag("affiliations", { node = node }); | 476 :tag("affiliations", { node = node }); |
471 | 477 |
472 origin.send(reply); | 478 origin.send(reply); |