# HG changeset patch # User Waqas Hussain # Date 1234797871 -18000 # Node ID ebfb904640d8f0c9c65d2b0382e33cb7447427e7 # Parent 1dbcf57154bd52e38531d4b26d282971e4aa4ac7 MUC: Made vCards work by redirecting vCard requests to bare JIDs diff -r 1dbcf57154bd -r ebfb904640d8 plugins/mod_muc.lua --- a/plugins/mod_muc.lua Mon Feb 16 20:05:58 2009 +0500 +++ b/plugins/mod_muc.lua Mon Feb 16 20:24:31 2009 +0500 @@ -345,7 +345,9 @@ 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"));