Skip to content

Commit a6d6302

Browse files
mgoldenbergHywan
authored andcommitted
refactor(indexeddb): add room id to event_cache_store::types::Gap
Signed-off-by: Michael Goldenberg <[email protected]>
1 parent 159c9b4 commit a6d6302

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

crates/matrix-sdk-indexeddb/src/event_cache_store/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ impl_event_cache_store! {
177177
.add_item(
178178
room_id,
179179
&types::Gap {
180+
room_id: room_id.to_owned(),
180181
chunk_identifier: new.index(),
181182
prev_token: gap.prev_token,
182183
},

crates/matrix-sdk-indexeddb/src/event_cache_store/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ impl From<matrix_sdk_base::linked_chunk::Position> for Position {
181181
/// which can be stored in IndexedDB.
182182
#[derive(Debug, Serialize, Deserialize)]
183183
pub struct Gap {
184+
/// The room in which the gap exists.
185+
pub room_id: OwnedRoomId,
184186
/// The identifier of the chunk containing this gap.
185187
pub chunk_identifier: u64,
186188
/// The token to use in the query, extracted from a previous "from" /

0 commit comments

Comments
 (0)