mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-24 03:27:59 +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) {
|
||||
return persistent.localDeviceIdsOf(localUser);
|
||||
} 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