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:
parent
bdc61a2db2
commit
466b7e2d08
2 changed files with 16 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue