From d4df8ac76d2841bc272a791841270d562121a09b Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 3 Nov 2021 18:08:37 +0100 Subject: [PATCH] client-api: Change serialized name of thirdparty_id_creds in compat mode --- crates/ruma-client-api/src/r0/uiaa.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ruma-client-api/src/r0/uiaa.rs b/crates/ruma-client-api/src/r0/uiaa.rs index bd814431..b6717eba 100644 --- a/crates/ruma-client-api/src/r0/uiaa.rs +++ b/crates/ruma-client-api/src/r0/uiaa.rs @@ -523,8 +523,8 @@ impl IncomingOAuth2 { #[serde(tag = "type", rename = "m.login.email.identity")] pub struct EmailIdentity<'a> { /// Thirdparty identifier credentials. - #[serde(rename = "threepidCreds")] - #[cfg_attr(feature = "compat", alias = "threepid_creds")] + #[cfg_attr(not(feature = "compat"), serde(rename = "threepidCreds"))] + #[cfg_attr(feature = "compat", rename = "threepid_creds", alias = "threepidCreds")] pub thirdparty_id_creds: &'a [ThirdpartyIdCredentials], /// The value of the session key given by the homeserver, if any. @@ -551,8 +551,8 @@ impl IncomingEmailIdentity { #[serde(tag = "type", rename = "m.login.msisdn")] pub struct Msisdn<'a> { /// Thirdparty identifier credentials. - #[serde(rename = "threepidCreds")] - #[cfg_attr(feature = "compat", alias = "threepid_creds")] + #[cfg_attr(not(feature = "compat"), serde(rename = "threepidCreds"))] + #[cfg_attr(feature = "compat", rename = "threepid_creds", alias = "threepidCreds")] pub thirdparty_id_creds: &'a [ThirdpartyIdCredentials], /// The value of the session key given by the homeserver, if any.