fixing ranges

This commit is contained in:
Benjamin Kampmann
2022-04-12 19:59:20 +02:00
parent 5d6c4852b1
commit 24266fe254
2 changed files with 2 additions and 3 deletions

View File

@@ -97,7 +97,6 @@ where
store_cipher.hash_key(table_name, self.1.as_encoded_string().as_bytes()),
STANDARD_NO_PAD
),
KEY_SEPARATOR
].concat()
}
}

View File

@@ -751,7 +751,7 @@ impl IndexeddbStore {
self.inner
.transaction_on_one_with_mode(KEYS::ROOM_STATE, IdbTransactionMode::Readonly)?
.object_store(KEYS::ROOM_STATE)?
.get(&self.encode_key(KEYS::ROOM_STATE, (room_id, &event_type, state_key)))?
.get(&self.encode_key(KEYS::ROOM_STATE, (room_id, event_type, state_key)))?
.await?
.map(|f| self.deserialize_event(f))
.transpose()
@@ -762,7 +762,7 @@ impl IndexeddbStore {
room_id: &RoomId,
event_type: StateEventType,
) -> Result<Vec<Raw<AnySyncStateEvent>>> {
let range = self.encode_to_range(KEYS::ROOM_STATE, (room_id, &event_type))?;
let range = self.encode_to_range(KEYS::ROOM_STATE, (room_id, event_type))?;
Ok(self
.inner
.transaction_on_one_with_mode(KEYS::ROOM_STATE, IdbTransactionMode::Readonly)?