#[non_exhaustive]pub struct PresenceEventContent {
pub avatar_url: Option<OwnedMxcUri>,
pub currently_active: Option<bool>,
pub displayname: Option<String>,
pub last_active_ago: Option<UInt>,
pub presence: PresenceState,
pub status_msg: Option<String>,
pub status: PresenceStatus,
}Expand description
Informs the room of members presence.
This is the only type a PresenceEvent can contain as its content field.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.avatar_url: Option<OwnedMxcUri>The current avatar URL for this user.
If you activate the compat-empty-string-null feature, this field being an empty string in
JSON will result in None here during deserialization.
currently_active: Option<bool>Deprecated when MSC4532 is enabled, use PresenceState::currently_active instead
Whether the user is currently active or not.
If the unstable-msc4532 feature is enabled and presence is a MSC4532
presence state, this field will be ignored and will always have the same value
as PresenceState::currently_active after deserialization.
displayname: Option<String>The current display name for this user.
last_active_ago: Option<UInt>The last time since this user performed some action, in milliseconds.
presence: PresenceStateThe presence state for this user.
status_msg: Option<String>Deprecated when MSC4532 is enabled, use status instead
An optional description to accompany the presence.
If the unstable-msc4532 feature is enabled, this field will always have the same value as
status.msg after deserialization.
status: PresenceStatusOptional information to accompany the presence.
This field uses the unstable prefix defined in MSC4532.
If this field is not present at deserialization, the value of status_msg
will be used instead.
Implementations§
Source§impl PresenceEventContent
impl PresenceEventContent
Sourcepub fn new(presence: PresenceState) -> Self
pub fn new(presence: PresenceState) -> Self
Creates a new PresenceEventContent with the given state.