1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 14:22:05 +01:00

Use contains(BareJid) instead of entries.containsKey in Roster

This commit is contained in:
Florian Schmaus 2015-12-01 18:08:54 +01:00
parent 3c2dd9b9e6
commit a5e9037907

View file

@ -1318,7 +1318,7 @@ public final class Roster extends Manager {
// Add the new presence, using the resources as a key. // Add the new presence, using the resources as a key.
userPresences.put(fromResource, presence); userPresences.put(fromResource, presence);
// If the user is in the roster, fire an event. // If the user is in the roster, fire an event.
if (entries.containsKey(key)) { if (contains(key)) {
fireRosterPresenceEvent(presence); fireRosterPresenceEvent(presence);
} }
break; break;
@ -1339,7 +1339,7 @@ public final class Roster extends Manager {
userPresences.put(fromResource, presence); userPresences.put(fromResource, presence);
} }
// If the user is in the roster, fire an event. // If the user is in the roster, fire an event.
if (entries.containsKey(key)) { if (contains(key)) {
fireRosterPresenceEvent(presence); fireRosterPresenceEvent(presence);
} }
break; break;
@ -1359,7 +1359,7 @@ public final class Roster extends Manager {
// Set the new presence using the empty resource as a key. // Set the new presence using the empty resource as a key.
userPresences.put(Resourcepart.EMPTY, presence); userPresences.put(Resourcepart.EMPTY, presence);
// If the user is in the roster, fire an event. // If the user is in the roster, fire an event.
if (entries.containsKey(key)) { if (contains(key)) {
fireRosterPresenceEvent(presence); fireRosterPresenceEvent(presence);
} }
break; break;