matrix_sdk_base: expose RoomMember
parent
bc48674f9f
commit
f7039d9a8d
|
@ -53,7 +53,7 @@ mod state;
|
||||||
|
|
||||||
pub use client::{BaseClient, BaseClientConfig, RoomState, RoomStateType};
|
pub use client::{BaseClient, BaseClientConfig, RoomState, RoomStateType};
|
||||||
pub use event_emitter::{CustomEvent, EventEmitter, SyncRoom};
|
pub use event_emitter::{CustomEvent, EventEmitter, SyncRoom};
|
||||||
pub use models::Room;
|
pub use models::{Room, RoomMember};
|
||||||
pub use state::{AllRooms, ClientState};
|
pub use state::{AllRooms, ClientState};
|
||||||
|
|
||||||
#[cfg(feature = "encryption")]
|
#[cfg(feature = "encryption")]
|
||||||
|
|
|
@ -83,6 +83,14 @@ impl PartialEq for RoomMember {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl 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 {
|
pub fn new(event: &SyncStateEvent<MemberEventContent>, room_id: &RoomId) -> Self {
|
||||||
Self {
|
Self {
|
||||||
name: event.state_key.clone(),
|
name: event.state_key.clone(),
|
||||||
|
|
Loading…
Reference in New Issue