aboutsummaryrefslogtreecommitdiffstats
path: root/util/pubsub.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-26 19:49:29 +0200
committerKim Alvefur <zash@zash.se>2018-06-26 19:49:29 +0200
commit52de5795921c7069c5b021c4104d908aea4f0340 (patch)
treef4bf16fb5efec3f103f4fd837e82dbb710440226 /util/pubsub.lua
parentd17ebcbfe8e3f9b6b56ad897c630481ca4fab7a1 (diff)
downloadprosody-52de5795921c7069c5b021c4104d908aea4f0340.tar.gz
prosody-52de5795921c7069c5b021c4104d908aea4f0340.zip
util.pubsub: Normalize JID used as affiliation
XEP-0060 4.1 Affiliations > All affiliations MUST be based on a bare JID
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r--util/pubsub.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua
index 86dd8e14..ac356657 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -116,6 +116,7 @@ function service:set_affiliation(node, actor, jid, affiliation)
if not node_obj then
return false, "item-not-found";
end
+ jid = self.config.normal_jid(jid);
node_obj.affiliations[jid] = affiliation;
local _, jid_sub = self:get_subscription(node, true, jid);
if not jid_sub and not self:may(node, jid, "be_unsubscribed") then