aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-18 14:06:23 +0200
committerKim Alvefur <zash@zash.se>2018-08-18 14:06:23 +0200
commit4d37f9c8a9d9f45e7013f4e7c3c6f3841da79a9d (patch)
treefc374576a6dc7d6a253b7b2bff7c41aa8af970ca /plugins/muc
parent05fdf2d42c999f1452fa9e6c2d7587c09a9d5eb9 (diff)
downloadprosody-4d37f9c8a9d9f45e7013f4e7c3c6f3841da79a9d.tar.gz
prosody-4d37f9c8a9d9f45e7013f4e7c3c6f3841da79a9d.zip
MUC: Direct PubSub queries to occupants to their real bare JID
This allows accessing PEP nodes of participants without knowing their real JIDs.
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/muc.lib.lua3
1 files changed, 2 insertions, 1 deletions
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);