mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Update VCardManager.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@9066 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -39,13 +39,6 @@ import org.xmlpull.mxp1.MXParser;
|
|||||||
import org.xmlpull.v1.XmlPullParser;
|
import org.xmlpull.v1.XmlPullParser;
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.swing.ImageIcon;
|
|
||||||
import javax.swing.JComponent;
|
|
||||||
import javax.swing.JMenu;
|
|
||||||
import javax.swing.JMenuItem;
|
|
||||||
import javax.swing.JOptionPane;
|
|
||||||
|
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
@ -64,6 +57,13 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JMenu;
|
||||||
|
import javax.swing.JMenuItem;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VCardManager handles all VCard loading/caching within Spark.
|
* VCardManager handles all VCard loading/caching within Spark.
|
||||||
*
|
*
|
||||||
@ -132,7 +132,8 @@ public class VCardManager {
|
|||||||
newPresence.removeExtension(jabberExt);
|
newPresence.removeExtension(jabberExt);
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] bytes = getVCard().getAvatar();
|
if (personalVCard != null) {
|
||||||
|
byte[] bytes = personalVCard.getAvatar();
|
||||||
if (bytes != null) {
|
if (bytes != null) {
|
||||||
String hash = org.jivesoftware.spark.util.StringUtils.hash(bytes);
|
String hash = org.jivesoftware.spark.util.StringUtils.hash(bytes);
|
||||||
update.setPhotoHash(hash);
|
update.setPhotoHash(hash);
|
||||||
@ -141,7 +142,7 @@ public class VCardManager {
|
|||||||
newPresence.addExtension(update);
|
newPresence.addExtension(update);
|
||||||
newPresence.addExtension(jax);
|
newPresence.addExtension(jax);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, presenceFilter);
|
}, presenceFilter);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user