only take into account non-backed up keys for counting

This commit is contained in:
Bruno Windels 2022-01-28 13:18:03 +01:00
parent 7d3e3b992b
commit eb134a6c47

View File

@ -77,7 +77,7 @@ export class InboundGroupSessionStore {
this._store.delete(range); this._store.delete(range);
} }
countNonBackedUpSessions(): Promise<number> { countNonBackedUpSessions(): Promise<number> {
return this._store.index("byBackup").count(); return this._store.index("byBackup").count(this._store.IDBKeyRange.only(BackupStatus.NotBackedUp));
} }
getFirstNonBackedUpSessions(amount: number): Promise<InboundGroupSessionEntry[]> { getFirstNonBackedUpSessions(amount: number): Promise<InboundGroupSessionEntry[]> {