Allow photos to be retrieved from LDAP for vcards
Description
Environment
Activity

Sergio Pereira September 20, 2007 at 11:36 PM
Not a problem Cassey .. did the change and all is working so far.
Thank you

Casey Harkins September 20, 2007 at 1:36 AM
I apologize, that mapping is actually not correct according to XEP-0153, the client we use (pidgin) just happens to be very forgiving. I've updated the mapping example:
http://www.upl.cs.wisc.edu/~charkins/openfire/openfire-vcard-mapping-example.txt
In particular, you need a TYPE tag specifying the MIME type inside the PHOTO tag and the {jpegPhoto} portion needs to be wrapped in a BINVAL tag. I tested this with Spark 2.5.6 and it seems to work. This also fixes the avatars not showing up in iChat (we have one user using iChat who wasn't seeing the avatars).
There is still potentially an issue with clients being notified properly that the avatar has changed (i.e. it is now available). In pidgin, I had to perform a "Get Info" (View Profile) on each buddy for the avatar to update. iChat is apparently having similar issues. I'll try to look into this as well.

Sergio Pereira September 19, 2007 at 12:56 AM
Casey ..did everything but still can't see the jpegPhoto from my client. I'm using OF 3.3.2 + your patch and as client Spark 2.5.6. I see no errors in the logs and the tag I'm using is {jpegPhoto} ans shown in your example. I did test using different clients but the result is pretty much the same, meanins ...can't see the photo from each other.
thx

Casey Harkins September 18, 2007 at 9:11 PM
Ignore the line I mention above and just look for the {jpegPhoto} line in the example file I linked to above. (It'd be nice if there were a "Preview" button for adding comments.)

Casey Harkins September 18, 2007 at 9:09 PM
Sergio: My patch does not make changes to the OF admin console (I'll try to add an additional patch for that soon). You can edit the openfire.xml configuration file by hand (/opt/openfire/conf/openfire.xml for me on Linux) and add the appropriate mapping to the vcard-mapping section. I've posted an example of that section of the configuration file here:
http://www.upl.cs.wisc.edu/~charkins/openfire/openfire-vcard-mapping-example.txt
You should just be able to edit your openfire.xml, find the end of your vcard mapping (look for </vCard%gt and add this line before it:
<PHOTO>{jpegPhoto}%lt;/PHOTO>
After you have the mapping set up and restart openfire, things should work for you. I have noticed using pidgin as a client that the photos do not show up on the buddy list without first doing a "Get Info" (i.e. "View Profile"). Other clients might have similar issues. (I haven't tracked down if its openfire or pidgin's fault).
Allow photos to be retrieved from LDAP for vCards. See the following URL:
http://java.sun.com/products/jndi/tutorial/ldap/misc/attrs.html