Changeset

8936:7b75c7ec926e

util.pubsub: Normalize JID used as affiliation XEP-0060 4.1 Affiliations > All affiliations MUST be based on a bare JID
author Kim Alvefur <zash@zash.se>
date Tue, 26 Jun 2018 19:49:29 +0200
parents 8935:a825ef6de45a
children 8937:0ae46e6ea647
files util/pubsub.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/pubsub.lua	Tue Jun 26 19:36:23 2018 +0200
+++ b/util/pubsub.lua	Tue Jun 26 19:49:29 2018 +0200
@@ -116,6 +116,7 @@
 	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