don't attempt to update KEM prekeys if we have no PQ-enabled devices

This commit is contained in:
Jonathan Klabunde Tomer
2023-09-14 11:11:22 -07:00
committed by GitHub
parent 2601d6e906
commit 8e598c19dc
2 changed files with 63 additions and 1 deletions

View File

@@ -372,7 +372,7 @@ public class AccountsManager {
final List<Long> pqEnabledDeviceIDs = keysManager.getPqEnabledDevices(pni).join();
keysManager.delete(pni);
keysManager.storeEcSignedPreKeys(pni, pniSignedPreKeys).join();
if (pniPqLastResortPreKeys != null) {
if (pniPqLastResortPreKeys != null && !pqEnabledDeviceIDs.isEmpty()) {
keysManager.storePqLastResort(pni, pqEnabledDeviceIDs.stream().collect(Collectors.toMap(Function.identity(), pniPqLastResortPreKeys::get))).join();
}