From b30db544a31dab621e771c29b4dfe27975e80727 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 28 Jan 2022 13:11:32 +0100 Subject: [PATCH] use idb key range to select non-backed up keys --- src/matrix/storage/idb/stores/InboundGroupSessionStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/storage/idb/stores/InboundGroupSessionStore.ts b/src/matrix/storage/idb/stores/InboundGroupSessionStore.ts index f16872a7..a2ccae95 100644 --- a/src/matrix/storage/idb/stores/InboundGroupSessionStore.ts +++ b/src/matrix/storage/idb/stores/InboundGroupSessionStore.ts @@ -81,7 +81,7 @@ export class InboundGroupSessionStore { } getFirstNonBackedUpSessions(amount: number): Promise { - return this._store.index("byBackup").selectLimit(0, amount); + return this._store.index("byBackup").selectLimit(this._store.IDBKeyRange.only(BackupStatus.NotBackedUp), amount); } async markAsBackedUp(roomId: string, senderKey: string, sessionId: string): Promise {