Changeset

9194:11a0b32fef24

MUC: Direct PubSub queries to occupants to their real bare JID This allows accessing PEP nodes of participants without knowing their real JIDs.
author Kim Alvefur <zash@zash.se>
date Sat, 18 Aug 2018 14:06:23 +0200
parents 9193:aba99b6539f5
children 9195:b6ffd4f951b9
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Sat Aug 18 00:41:49 2018 +0200
+++ b/plugins/muc/muc.lib.lua	Sat Aug 18 14:06:23 2018 +0200
@@ -727,7 +727,8 @@
 		end
 		stanza.attr.from, stanza.attr.to = current_nick, occupant.jid;
 		log("debug", "%s sent private iq stanza to %s (%s)", from, to, occupant.jid);
-		if stanza.tags[1].attr.xmlns == 'vcard-temp' then
+		local iq_ns = stanza.tags[1].attr.xmlns;
+		if iq_ns == 'vcard-temp' or iq_ns == "http://jabber.org/protocol/pubsub" then
 			stanza.attr.to = jid_bare(stanza.attr.to);
 		end
 		self:route_stanza(stanza);