Copy new spec description of MemberEventContent#reason

This commit is contained in:
Jonas Platte 2021-08-27 10:06:14 +02:00
parent fcb40894f4
commit c13737af04
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -80,7 +80,16 @@ pub struct MemberEventContent {
#[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>,
/// 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")]