mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 22:32: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:
parent
170c14e6f3
commit
4bec02e810
1 changed files with 7 additions and 2 deletions
|
@ -421,10 +421,15 @@ public class Roster {
|
|||
else if (presence.getType() == Presence.Type.UNAVAILABLE) {
|
||||
presenceMap.remove(key);
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (presence.getType() == Presence.Type.SUBSCRIBE) {
|
||||
if (subscriptionMode == SUBCRIPTION_ACCEPT_ALL) {
|
||||
// Accept all subscription requests.
|
||||
|
|
Loading…
Reference in a new issue