# HG changeset patch # User Kim Alvefur # Date 1534593983 -7200 # Node ID 11a0b32fef244673c434645b44fd7d7c6e10753e # Parent aba99b6539f549d86ea47f6cd423d1f3d7088c86 MUC: Direct PubSub queries to occupants to their real bare JID This allows accessing PEP nodes of participants without knowing their real JIDs. diff -r aba99b6539f5 -r 11a0b32fef24 plugins/muc/muc.lib.lua --- 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);