mod_vcard_ldap is, somehow, giving my photo types "png" according to debug output, even though I have this code:
ldap_attribute_to_vcard(vCard, {"photo", Value}) ->
{xmlelement,"PHOTO",[],[
{xmlelement,"TYPE",[],[{xmlcdata,"image/jpeg"}]},
{xmlelement,"BINVAL",[],[{xmlcdata, jlib:encode_base64(Value)}]}]};
=INFO REPORT==== 14-Aug-2012::16:07:53 ===D(<0.671.0>:ejabberd_receiver:320) : Received XML on stream = "<iq type='set' id='purple55e399f0'><vCard prodid='-//HandGen//NONSGML vGen v1.0//EN' version='2.0' xmlns='vcard-temp'><PHOTO><TYPE>image/png</TYPE><BINVAL>iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAX/GlDQ1BJQ0MgUHJvZmlsZQAAWIWVeQdUFM/Sb89sJiw5pyUnyTnnDJKzknNmyUEFBCQoCCgioCioiKggSpQkCorwR
Furthermore, is there a way to populate the multiple types of phone numbers?
ldap_attribute_to_vcard(vCard, {"tel", Value}) ->
{xmlelement,"TEL",[],[{xmlelement,"VOICE",[],[]},
{xmlelement,"WORK",[],[]},
{xmlelement,"NUMBER",[],[{xmlcdata,Value}]}]};
I tried something like this:
ldap_attribute_to_vcard(vCard, [ {"tel", Value}, {"mobile", Value2} ]) ->
but it obviously didn't work as I'm just grasping.
Any hints?