aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-26 20:27:41 +0200
committerKim Alvefur <zash@zash.se>2018-06-26 20:27:41 +0200
commit34e33be1e52536be5529c19feb2e3270c3083608 (patch)
tree99ea34a4622dfcd5004d252707bf4bd1f36e5024 /plugins
parent60239a64fdd524a0d46fefce942ceb64b986a2d7 (diff)
downloadprosody-34e33be1e52536be5529c19feb2e3270c3083608.tar.gz
prosody-34e33be1e52536be5529c19feb2e3270c3083608.zip
mod_pubsub: Handle :set_affiliation errors (not completely in line with the XEP)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index a6b010fb..8b15fca0 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -507,6 +507,12 @@ function handlers.owner_set_affiliations(origin, stanza, affiliations, service)
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);