Add avatar support in jabber.

cusax-fix
Damian Minkov 19 years ago
parent b4f18f78e4
commit 65febd1faf

@ -7,6 +7,7 @@
package net.java.sip.communicator.impl.protocol.jabber;
import org.jivesoftware.smack.*;
import org.jivesoftware.smackx.packet.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.jabberconstants.*;
@ -86,6 +87,9 @@ public boolean isLocal()
public byte[] getImage()
{
if(image == null)
image = getAvatar();
return image;
}
@ -284,5 +288,21 @@ RosterEntry getSourceEntry()
{
return rosterEntry;
}
private byte[] getAvatar()
{
try
{
VCard card = new VCard();
card.load(
ssclCallback.getParentProvider().getConnection(),
getAddress());
return card.getAvatar();
}
catch (XMPPException e) {}
return null;
}
}

@ -9,6 +9,7 @@ Import-Package: org.osgi.framework,
javax.xml.parsers,
javax.naming,
javax.naming.directory,
org.w3c.dom,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.util,
net.java.sip.communicator.service.configuration.event,

Loading…
Cancel
Save