diff --git a/crates/ruma-client-api/src/sync/sync_events/v4.rs b/crates/ruma-client-api/src/sync/sync_events/v4.rs index 07499aae..3a40ac5b 100644 --- a/crates/ruma-client-api/src/sync/sync_events/v4.rs +++ b/crates/ruma-client-api/src/sync/sync_events/v4.rs @@ -467,7 +467,7 @@ pub struct ExtensionsConfig { /// Request to receipt information with the given config. #[serde(skip_serializing_if = "Option::is_none")] - pub receipt: Option, + pub receipts: Option, /// Request to typing information with the given config. #[serde(skip_serializing_if = "Option::is_none")] @@ -483,7 +483,7 @@ impl ExtensionsConfig { self.to_device.is_none() && self.e2ee.is_none() && self.account_data.is_none() - && self.receipt.is_none() + && self.receipts.is_none() && self.typing.is_none() && self.other.is_empty() } @@ -507,7 +507,7 @@ pub struct Extensions { /// Receipt data extension in response. #[serde(skip_serializing_if = "Option::is_none")] - pub receipt: Option, + pub receipts: Option, /// Typing data extension in response. #[serde(skip_serializing_if = "Option::is_none")] @@ -522,7 +522,7 @@ impl Extensions { self.to_device.is_none() && self.e2ee.is_none() && self.account_data.is_none() - && self.receipt.is_none() + && self.receipts.is_none() && self.typing.is_none() } } @@ -627,11 +627,10 @@ pub struct AccountData { /// Receipt extension configuration. /// -/// Not yet part of the spec proposal. Taken from the reference implementation -/// +/// According to [MSC3960](https://github.com/matrix-org/matrix-spec-proposals/pull/3960) #[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] -pub struct ReceiptConfig { +pub struct ReceiptsConfig { /// Activate or deactivate this extension. Sticky. #[serde(skip_serializing_if = "Option::is_none")] pub enabled: Option, @@ -639,11 +638,10 @@ pub struct ReceiptConfig { /// Receipt extension response data. /// -/// Not yet part of the spec proposal. Taken from the reference implementation -/// +/// According to [MSC3960](https://github.com/matrix-org/matrix-spec-proposals/pull/3960) #[derive(Clone, Debug, Default, Serialize, Deserialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] -pub struct Receipt { +pub struct Receipts { /// The empheral receipt room event for each room #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub rooms: BTreeMap>,