mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Refactoring of presence using latest Smack.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@7192 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -12,7 +12,6 @@ package org.jivesoftware.spark;
|
||||
|
||||
import org.jivesoftware.resource.Res;
|
||||
import org.jivesoftware.resource.SparkRes;
|
||||
import org.jivesoftware.smack.Roster;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.muc.Occupant;
|
||||
@ -28,6 +27,12 @@ import org.jivesoftware.spark.util.ModelUtil;
|
||||
import org.jivesoftware.spark.util.log.Log;
|
||||
import org.jivesoftware.sparkimpl.profile.VCardManager;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Font;
|
||||
@ -49,12 +54,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
* Handles all users in the agent application. Each user or chatting user can be referenced from the User
|
||||
* Manager. You would use the UserManager to get visitors in a chat room or secondary agents.
|
||||
@ -351,14 +350,8 @@ public class UserManager {
|
||||
* @return the full jid with resource.
|
||||
*/
|
||||
public String getFullJID(String jid) {
|
||||
Roster roster = SparkManager.getConnection().getRoster();
|
||||
Presence presence = roster.getPresence(jid);
|
||||
if (presence != null) {
|
||||
return presence.getFrom();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Presence presence = PresenceManager.getPresence(jid);
|
||||
return presence.getFrom();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user