From c883cd8148fd2346a32178a6ab93be16778d86d6 Mon Sep 17 00:00:00 2001 From: Ravi Khadiwala Date: Mon, 4 Aug 2025 11:48:35 -0500 Subject: [PATCH] Encourage PQ prekey upload to new store --- .../whispersystems/textsecuregcm/storage/KeysManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/KeysManager.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/KeysManager.java index e76aafda3..742433bbf 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/KeysManager.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/KeysManager.java @@ -164,9 +164,9 @@ public class KeysManager { } public CompletableFuture getPqCount(final UUID identifier, final byte deviceId) { - return pagedPqPreKeys.getCount(identifier, deviceId).thenCompose(count -> count == 0 - ? pqPreKeys.getCount(identifier, deviceId) - : CompletableFuture.completedFuture(count)); + // We only return the paged prekey count to encourage clients to upload more prekeys if they only have prekeys + // stored in the previous key store format + return pagedPqPreKeys.getCount(identifier, deviceId); } public CompletableFuture deleteSingleUsePreKeys(final UUID identifier) {