Software /
code /
prosody
Diff
util/pubsub.lua @ 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 |
parent | 8813:2c55fccb0c0c |
child | 8936:7b75c7ec926e |
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";