mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 18:48: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,8 +408,13 @@ 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)) {
|
||||
fireRosterPresenceEvent(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.
|
||||
|
|
Loading…
Reference in a new issue