1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-16 12:12:06 +01:00

Fixed notification of presence unavailable packets.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2062 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-08-24 03:59:42 +00:00 committed by mtucker
parent 170c14e6f3
commit 4bec02e810

View file

@ -421,10 +421,15 @@ public class Roster {
else if (presence.getType() == Presence.Type.UNAVAILABLE) { else if (presence.getType() == Presence.Type.UNAVAILABLE) {
presenceMap.remove(key); presenceMap.remove(key);
// If the user is in the roster, fire an event. // 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); fireRosterPresenceEvent(key);
} }
} }
}
}
else if (presence.getType() == Presence.Type.SUBSCRIBE) { else if (presence.getType() == Presence.Type.SUBSCRIBE) {
if (subscriptionMode == SUBCRIPTION_ACCEPT_ALL) { if (subscriptionMode == SUBCRIPTION_ACCEPT_ALL) {
// Accept all subscription requests. // Accept all subscription requests.