dont skip serialising default values for capabilities
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
d5d2698da3
commit
5ab81eef0a
@ -23,44 +23,24 @@ pub mod v3;
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct Capabilities {
|
||||
/// Capability to indicate if the user can change their password.
|
||||
#[serde(
|
||||
rename = "m.change_password",
|
||||
default,
|
||||
skip_serializing_if = "ChangePasswordCapability::is_default"
|
||||
)]
|
||||
#[serde(rename = "m.change_password", default)]
|
||||
pub change_password: ChangePasswordCapability,
|
||||
|
||||
/// The room versions the server supports.
|
||||
#[serde(
|
||||
rename = "m.room_versions",
|
||||
default,
|
||||
skip_serializing_if = "RoomVersionsCapability::is_default"
|
||||
)]
|
||||
#[serde(rename = "m.room_versions", default)]
|
||||
pub room_versions: RoomVersionsCapability,
|
||||
|
||||
/// Capability to indicate if the user can change their display name.
|
||||
#[serde(
|
||||
rename = "m.set_displayname",
|
||||
default,
|
||||
skip_serializing_if = "SetDisplayNameCapability::is_default"
|
||||
)]
|
||||
#[serde(rename = "m.set_displayname", default)]
|
||||
pub set_displayname: SetDisplayNameCapability,
|
||||
|
||||
/// Capability to indicate if the user can change their avatar.
|
||||
#[serde(
|
||||
rename = "m.set_avatar_url",
|
||||
default,
|
||||
skip_serializing_if = "SetAvatarUrlCapability::is_default"
|
||||
)]
|
||||
#[serde(rename = "m.set_avatar_url", default)]
|
||||
pub set_avatar_url: SetAvatarUrlCapability,
|
||||
|
||||
/// Capability to indicate if the user can change the third-party identifiers associated with
|
||||
/// their account.
|
||||
#[serde(
|
||||
rename = "m.3pid_changes",
|
||||
default,
|
||||
skip_serializing_if = "ThirdPartyIdChangesCapability::is_default"
|
||||
)]
|
||||
#[serde(rename = "m.3pid_changes", default)]
|
||||
pub thirdparty_id_changes: ThirdPartyIdChangesCapability,
|
||||
|
||||
/// Any other custom capabilities that the server supports outside of the specification,
|
||||
|
Loading…
x
Reference in New Issue
Block a user