aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_muc.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-02-16 20:24:31 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-02-16 20:24:31 +0500
commit0ed691e5632ba3b8fe2805537211be3cd15e3a90 (patch)
tree2770a7b7668b58fe02a81530fb943aa82ad02501 /plugins/mod_muc.lua
parent11b1d563ce87237008b1323869e049a1a1988fe1 (diff)
downloadprosody-0ed691e5632ba3b8fe2805537211be3cd15e3a90.tar.gz
prosody-0ed691e5632ba3b8fe2805537211be3cd15e3a90.zip
MUC: Made vCards work by redirecting vCard requests to bare JIDs
Diffstat (limited to 'plugins/mod_muc.lua')
-rw-r--r--plugins/mod_muc.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_muc.lua b/plugins/mod_muc.lua
index 36ea0477..9a559f2d 100644
--- a/plugins/mod_muc.lua
+++ b/plugins/mod_muc.lua
@@ -345,7 +345,9 @@ function handle_to_occupant(origin, stanza) -- PM, vCards, etc
else -- private stanza
local o_data = rooms:get(room, to);
if o_data then
- stanza.attr.to, stanza.attr.from = o_data.jid, current_nick;
+ local jid = o_data.jid;
+ if stanza.name=='iq' and type=='get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then jid = jid_bare(jid); end
+ stanza.attr.to, stanza.attr.from = jid, current_nick;
core_route_stanza(component, stanza);
else -- recipient not in room
origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Recipient not in room"));