Comparison

plugins/mod_muc.lua @ 813:ebfb904640d8

MUC: Made vCards work by redirecting vCard requests to bare JIDs
author Waqas Hussain <waqas20@gmail.com>
date Mon, 16 Feb 2009 20:24:31 +0500
parent 812:1dbcf57154bd
child 817:e3e3919b6c7e
comparison
equal deleted inserted replaced
812:1dbcf57154bd 813:ebfb904640d8
343 jid_nick:remove(from, room); 343 jid_nick:remove(from, room);
344 end 344 end
345 else -- private stanza 345 else -- private stanza
346 local o_data = rooms:get(room, to); 346 local o_data = rooms:get(room, to);
347 if o_data then 347 if o_data then
348 stanza.attr.to, stanza.attr.from = o_data.jid, current_nick; 348 local jid = o_data.jid;
349 if stanza.name=='iq' and type=='get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then jid = jid_bare(jid); end
350 stanza.attr.to, stanza.attr.from = jid, current_nick;
349 core_route_stanza(component, stanza); 351 core_route_stanza(component, stanza);
350 else -- recipient not in room 352 else -- recipient not in room
351 origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Recipient not in room")); 353 origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Recipient not in room"));
352 end 354 end
353 end 355 end