mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 00:02:06 +01:00
Also store unavailable presences in the map for non-Roster presences
Fixes SMACK-808.
This commit is contained in:
parent
1fd03c396a
commit
dddf62763e
1 changed files with 2 additions and 3 deletions
|
@ -1504,14 +1504,13 @@ public final class Roster extends Manager {
|
||||||
case unavailable:
|
case unavailable:
|
||||||
// If no resource, this is likely an offline presence as part of
|
// If no resource, this is likely an offline presence as part of
|
||||||
// a roster presence flood. In that case, we store it.
|
// a roster presence flood. In that case, we store it.
|
||||||
|
userPresences = getOrCreatePresencesInternal(key);
|
||||||
if (from.hasNoResource()) {
|
if (from.hasNoResource()) {
|
||||||
// Get the user presence map
|
// Get the user presence map
|
||||||
userPresences = getOrCreatePresencesInternal(key);
|
|
||||||
userPresences.put(Resourcepart.EMPTY, presence);
|
userPresences.put(Resourcepart.EMPTY, presence);
|
||||||
}
|
}
|
||||||
// Otherwise, this is a normal offline presence.
|
// Otherwise, this is a normal offline presence.
|
||||||
else if (presenceMap.get(key) != null) {
|
else {
|
||||||
userPresences = presenceMap.get(key);
|
|
||||||
// Store the offline presence, as it may include extra information
|
// Store the offline presence, as it may include extra information
|
||||||
// such as the user being on vacation.
|
// such as the user being on vacation.
|
||||||
userPresences.put(fromResource, presence);
|
userPresences.put(fromResource, presence);
|
||||||
|
|
Loading…
Reference in a new issue