mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Avoid returning empty set of deviceIds in caching store
This commit is contained in:
parent
a8b2446042
commit
2391cffa97
1 changed files with 7 additions and 1 deletions
|
@ -75,7 +75,13 @@ public class CachingOmemoStore<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Se
|
||||||
if (persistent != null) {
|
if (persistent != null) {
|
||||||
return persistent.localDeviceIdsOf(localUser);
|
return persistent.localDeviceIdsOf(localUser);
|
||||||
} else {
|
} else {
|
||||||
return new TreeSet<>(); //TODO: ?
|
SortedSet<Integer> deviceIds = new TreeSet<>();
|
||||||
|
for (OmemoDevice device : caches.keySet()) {
|
||||||
|
if (device.getJid().equals(localUser)) {
|
||||||
|
deviceIds.add(device.getDeviceId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return deviceIds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue