Skip to content

Commit c883cd8

Browse files
committed
Encourage PQ prekey upload to new store
1 parent 1e77d04 commit c883cd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

service/src/main/java/org/whispersystems/textsecuregcm/storage/KeysManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ public CompletableFuture<Integer> getEcCount(final UUID identifier, final byte d
164164
}
165165

166166
public CompletableFuture<Integer> getPqCount(final UUID identifier, final byte deviceId) {
167-
return pagedPqPreKeys.getCount(identifier, deviceId).thenCompose(count -> count == 0
168-
? pqPreKeys.getCount(identifier, deviceId)
169-
: CompletableFuture.completedFuture(count));
167+
// We only return the paged prekey count to encourage clients to upload more prekeys if they only have prekeys
168+
// stored in the previous key store format
169+
return pagedPqPreKeys.getCount(identifier, deviceId);
170170
}
171171

172172
public CompletableFuture<Void> deleteSingleUsePreKeys(final UUID identifier) {

0 commit comments

Comments
 (0)