]> granicus.if.org Git - ejabberd/commitdiff
Photos from LDAP not displayed in some clients, lacking TYPE (thanks to Alex Crycheck...
authorBadlop <badlop@process-one.net>
Mon, 16 Apr 2012 10:25:07 +0000 (12:25 +0200)
committerBadlop <badlop@process-one.net>
Mon, 16 Apr 2012 10:25:14 +0000 (12:25 +0200)
src/mod_vcard_ldap.erl

index 1d6f1202a753c0cd993f4d81997976e81776021a..26a6f58c6d0133f5350464c7f33757e0b9deecff 100644 (file)
@@ -352,6 +352,7 @@ ldap_attribute_to_vcard(vCard, {"email", Value}) ->
 
 ldap_attribute_to_vcard(vCard, {"photo", Value}) ->
     {xmlelement,"PHOTO",[],[
+                           {xmlelement,"TYPE",[],[{xmlcdata,"image/jpeg"}]},
                            {xmlelement,"BINVAL",[],[{xmlcdata, jlib:encode_base64(Value)}]}]};
 
 ldap_attribute_to_vcard(vCardN, {"family", Value}) ->