mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 02:58:00 +01:00
Fixes for roster presence notification.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2060 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
224d0a17a7
commit
aa3920da05
1 changed files with 7 additions and 2 deletions
|
@ -408,10 +408,15 @@ public class Roster {
|
|||
if (presence.getType() == Presence.Type.AVAILABLE) {
|
||||
presenceMap.put(key, presence);
|
||||
// If the user is in the roster, fire an event.
|
||||
if (entries.contains(key)) {
|
||||
synchronized (entries) {
|
||||
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
||||
RosterEntry entry = (RosterEntry)i.next();
|
||||
if (entry.getUser().equals(key)) {
|
||||
fireRosterPresenceEvent(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// If an "unavailable" packet, remove any entries in the presence map.
|
||||
else if (presence.getType() == Presence.Type.UNAVAILABLE) {
|
||||
presenceMap.remove(key);
|
||||
|
|
Loading…
Reference in a new issue