mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 14:26:53 +00:00
Do not set one-time pre-keys if the lists of new keys are empty
This commit is contained in:
1 parent
5b0fcbe854
commit
3cf1b92dfc
2 files changed
+29
-2
No files matched your search
+2
-2
@@ -144,11 +144,11 @@ public class KeysController {
|
||||
return updateAccountFuture.thenCompose(updatedAccount -> {
|
||||
final List<CompletableFuture<Void>> storeFutures = new ArrayList<>(3);
|
||||
|
||||
if (setKeysRequest.preKeys() != null) {
|
||||
if (setKeysRequest.preKeys() != null && !setKeysRequest.preKeys().isEmpty()) {
|
||||
storeFutures.add(keys.storeEcOneTimePreKeys(identifier, device.getId(), setKeysRequest.preKeys()));
|
||||
}
|
||||
|
||||
if (setKeysRequest.pqPreKeys() != null) {
|
||||
if (setKeysRequest.pqPreKeys() != null && !setKeysRequest.pqPreKeys().isEmpty()) {
|
||||
storeFutures.add(keys.storeKemOneTimePreKeys(identifier, device.getId(), setKeysRequest.pqPreKeys()));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user