diff --git a/matrix_sdk_base/src/lib.rs b/matrix_sdk_base/src/lib.rs index 1934faf59b9..6f4377b48dc 100644 --- a/matrix_sdk_base/src/lib.rs +++ b/matrix_sdk_base/src/lib.rs @@ -53,7 +53,7 @@ mod state; pub use client::{BaseClient, BaseClientConfig, RoomState, RoomStateType}; pub use event_emitter::{CustomEvent, EventEmitter, SyncRoom}; -pub use models::Room; +pub use models::{Room, RoomMember}; pub use state::{AllRooms, ClientState}; #[cfg(feature = "encryption")] diff --git a/matrix_sdk_base/src/models/room_member.rs b/matrix_sdk_base/src/models/room_member.rs index efe31aba76c..393d54ac6d4 100644 --- a/matrix_sdk_base/src/models/room_member.rs +++ b/matrix_sdk_base/src/models/room_member.rs @@ -83,6 +83,14 @@ impl PartialEq for RoomMember { } impl RoomMember { + /// Create a new room member. + /// + /// # Arguments + /// + /// * `event` - event associated with a member joining, leaving or getting + /// invited to a room. + /// + /// * `room_id` - The unique id of the room this member is part of. pub fn new(event: &SyncStateEvent, room_id: &RoomId) -> Self { Self { name: event.state_key.clone(),