Patch proposed to able VCard class to removes current avatar

Hi,

Jitsi (http://jitsi.org) has recently implemented a functionality to remove the current avatar using vCard (cf. XEP0153). This requires to send a vCard with an empty “photo” tag, which leads us to modify the behavior of the “setAvatar” function of the smack “VCard” class.

These modifications correspond to the attached patch, that we would like to push upstream to the smack library.

This patch induces the following behaviors when calling vCard setAvatar(byte[] bytes) or setAvatar(byte[] bytes, String mimeType):

  1. If “bytes” is null, then no “photo” tag is included in the vCard.

  2. If “bytes” is non-null but with a length equal to zero, then an empty “photo” tag is included in the vCard.

  3. If “bytes” is non-null but with a length greater than zero, then a “photo” tag containing a “type” and a “binval” tags is included in the vCard.

Regards,

Vincent


Vincent Lucas, Ph.D. Jitsi developer

chenzo@jitsi.org http://jitsi.org
vcard_functionnality_removes_current_avatar_XEP0153.patch.zip (748 Bytes)

Hi. Thanks for the patch. I have filed this as SMACK-370. Hopefully Robin will review it at some point.

And then are there any development news about picture presence changes ? My question is related with this :