use of org.jivesoftware.sparkimpl.profile.ext.VCardUpdateExtension in project Spark by igniterealtime.
the class ContactItem method setPresence.
/**
* Sets the current presence on this contact item.
*
* @param presence the presence.
*/
public void setPresence(Presence presence) {
this.presence = presence;
final VCardUpdateExtension extension = presence.getExtension("x", "vcard-temp:x:update");
// Handle vCard update packet.
if (extension != null) {
String hash = extension.getPhotoHash();
if (hash != null) {
this.hash = hash;
if (!hashExists(hash)) {
updateAvatar();
updateAvatarInSideIcon();
}
}
}
updatePresenceIcon(presence);
}
Aggregations