1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

Fix offline presence info, including test case (SMACK-219).

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@8275 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2007-05-10 22:48:24 +00:00 committed by matt
parent bdc61a2db2
commit 466b7e2d08
2 changed files with 16 additions and 9 deletions

View file

@ -696,10 +696,9 @@ public class Roster {
// Otherwise, this is a normal offline presence.
else if (presenceMap.get(key) != null) {
Map<String, Presence> userPresences = presenceMap.get(key);
userPresences.remove(StringUtils.parseResource(from));
if (userPresences.isEmpty()) {
presenceMap.remove(key);
}
// Store the offline presence, as it may include extra information
// such as the user being on vacation.
userPresences.put(StringUtils.parseResource(from), presence);
}
// If the user is in the roster, fire an event.
for (RosterEntry entry : entries) {