diff --git a/crates/ruma-events/src/room/member.rs b/crates/ruma-events/src/room/member.rs index 78923ddc..fdd5d697 100644 --- a/crates/ruma-events/src/room/member.rs +++ b/crates/ruma-events/src/room/member.rs @@ -80,7 +80,16 @@ pub struct MemberEventContent { #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option, - /// The reason for leaving a room. + /// User-supplied text for why their membership has changed. + /// + /// For kicks and bans, this is typically the reason for the kick or ban. For other membership + /// changes, this is a way for the user to communicate their intent without having to send a + /// message to the room, such as in a case where Bob rejects an invite from Alice about an + /// upcoming concert, but can't make it that day. + /// + /// Clients are not recommended to show this reason to users when receiving an invite due to + /// the potential for spam and abuse. Hiding the reason behind a button or other component + /// is recommended. #[cfg(feature = "unstable-pre-spec")] #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(skip_serializing_if = "Option::is_none")]