matrix_sdk_base::deserialized_responses

Type Alias MemberEvent

Source
pub type MemberEvent = SyncOrStrippedState<RoomMemberEventContent>;
Expand description

Wrapper around both MemberEvent-Types

Aliased Type§

enum MemberEvent {
    Sync(SyncStateEvent<RoomMemberEventContent>),
    Stripped(StrippedStateEvent<RoomMemberEventContent>),
}

Variants§

§

Sync(SyncStateEvent<RoomMemberEventContent>)

An event from a room in joined or left state.

§

Stripped(StrippedStateEvent<RoomMemberEventContent>)

An event from a room in invited state.

Implementations§

Source§

impl MemberEvent

Source

pub fn membership(&self) -> &MembershipState

The membership state of the user.

Source

pub fn user_id(&self) -> &UserId

The user id associated to this member event.

Source

pub fn display_name(&self) -> DisplayName

The name that should be displayed for this member event.

It there is no displayname in the event’s content, the localpart or the user ID is returned.

Source

pub fn reason(&self) -> Option<&str>

The optional reason why the membership changed.

Source

pub fn timestamp(&self) -> Option<UInt>

The optional timestamp for this member event.