Skip to content

Commit

Permalink
fixup! state store: change schema for send_queue_events table
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjbvr committed Jun 26, 2024
1 parent 29ac3e0 commit 8e8d793
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/matrix-sdk-indexeddb/src/state_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1495,10 +1495,11 @@ impl_state_store!({
.get_all()?
.await?
.into_iter()
.map(|item| {
self.deserialize_value(&item).map(|event: PersistedQueuedEvent| event.room_id)
})
.collect::<Result<HashSet<OwnedRoomId>, _>>()?;
.map(|item| self.deserialize_value::<Vec<PersistedQueuedEvent>>(&item))
.collect::<Result<Vec<Vec<PersistedQueuedEvent>>, _>>()?
.into_iter()
.flat_map(|vec| vec.into_iter().map(|item| item.room_id))
.collect::<BTreeSet<_>>();

Ok(all_entries.into_iter().collect())
}
Expand Down

0 comments on commit 8e8d793

Please sign in to comment.