matrix_sdk_base: expose RoomMember
This commit is contained in:
parent
bc48674f9f
commit
f7039d9a8d
2 changed files with 9 additions and 1 deletions
|
@ -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")]
|
||||
|
|
|
@ -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<MemberEventContent>, room_id: &RoomId) -> Self {
|
||||
Self {
|
||||
name: event.state_key.clone(),
|
||||
|
|
Loading…
Reference in a new issue