Changeset

8816:0f9d5cfa84f9

util.pubsub: Also check for affiliation set on bare JID This fixes eg publishing from a full JID when the affiliation has been set on the bare JID, as would be common in XMPP.
author Kim Alvefur <zash@zash.se>
date Tue, 22 May 2018 01:32:44 +0200
parents 8815:5974c9da1391
children 8817:9a3066a580ad
files util/pubsub.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/pubsub.lua	Mon May 21 00:44:37 2018 +0200
+++ b/util/pubsub.lua	Tue May 22 01:32:44 2018 +0200
@@ -75,7 +75,8 @@
 	if actor == true then return true; end
 
 	local node_obj = self.nodes[node];
-	local node_aff = node_obj and node_obj.affiliations[actor];
+	local node_aff = node_obj and (node_obj.affiliations[actor]
+	              or node_obj.affiliations[self.config.normalize_jid(actor)]);
 	local service_aff = self.affiliations[actor]
 	                 or self.config.get_affiliation(actor, node, action)
 	                 or "none";