diff --git a/crates/matrix-sdk-base/src/client.rs b/crates/matrix-sdk-base/src/client.rs index 6a8dbf9c0..0ecf33c45 100644 --- a/crates/matrix-sdk-base/src/client.rs +++ b/crates/matrix-sdk-base/src/client.rs @@ -21,6 +21,8 @@ use std::{ use std::{ops::Deref, sync::Arc}; use eyeball::{SharedObservable, Subscriber}; +use eyeball_im::{Vector, VectorDiff}; +use futures_util::Stream; use matrix_sdk_common::instant::Instant; #[cfg(feature = "e2e-encryption")] use matrix_sdk_crypto::{ @@ -169,6 +171,11 @@ impl BaseClient { self.store.rooms_filtered(filter) } + /// Get a stream of all the rooms, in addition to the existing rooms. + pub fn rooms_stream(&self) -> (Vector, impl Stream>>) { + self.store.rooms_stream() + } + /// Lookup the Room for the given RoomId, or create one, if it didn't exist /// yet in the store pub fn get_or_create_room(&self, room_id: &RoomId, room_state: RoomState) -> Room {