Software /
code /
prosody
Diff
plugins/mod_pubsub/pubsub.lib.lua @ 8939:849c4683eaa0
mod_pubsub: Handle :set_affiliation errors (not completely in line with the XEP)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 26 Jun 2018 20:27:41 +0200 |
parent | 8938:384ef9732b81 |
child | 8940:365b16109d95 |
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua Tue Jun 26 20:29:33 2018 +0200 +++ b/plugins/mod_pubsub/pubsub.lib.lua Tue Jun 26 20:27:41 2018 +0200 @@ -507,6 +507,12 @@ if affiliation == "none" then affiliation = nil; end local ok, err = service:set_affiliation(node, stanza.attr.from, jid, affiliation); + if not ok then + -- FIXME Incomplete error handling, + -- see XEP 60 8.9.2.4 Multiple Simultaneous Modifications + origin.send(pubsub_error_reply(stanza, err)); + return true; + end end local reply = st.reply(stanza);