mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-02-02 07:31:38 +01:00
adjust query for finding all state events of a type
we were looking for state events with state key between \0 and \u10FFFF but an empty state key is also valid and would come before \0, so allow empty state keys at the beginning of the range and include them in the result by opening the lower bound.
This commit is contained in:
parent
68707d3963
commit
32835e26b9
@ -43,9 +43,9 @@ export class RoomStateStore {
|
|||||||
|
|
||||||
getAllForType(roomId: string, type: string): Promise<RoomStateEntry[]> {
|
getAllForType(roomId: string, type: string): Promise<RoomStateEntry[]> {
|
||||||
const range = this._roomStateStore.IDBKeyRange.bound(
|
const range = this._roomStateStore.IDBKeyRange.bound(
|
||||||
encodeKey(roomId, type, MIN_UNICODE),
|
encodeKey(roomId, type, ""),
|
||||||
encodeKey(roomId, type, MAX_UNICODE),
|
encodeKey(roomId, type, MAX_UNICODE),
|
||||||
true,
|
false,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
return this._roomStateStore.selectAll(range);
|
return this._roomStateStore.selectAll(range);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user