From 6ba3049a78124d983a23668419af4c1b2ee97e96 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 18 Aug 2018 14:06:23 +0200 Subject: MUC: Direct PubSub queries to occupants to their real bare JID This allows accessing PEP nodes of participants without knowing their real JIDs. --- plugins/muc/muc.lib.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/muc/muc.lib.lua') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index aae1d155..2d643219 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -727,7 +727,8 @@ function room_mt:handle_iq_to_occupant(origin, stanza) 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); -- cgit v1.2.3