client-api: Fix typo in sliding sync extensions
It has always been `receipts` not `receipt`.
This commit is contained in:
parent
44daf84e46
commit
471c46273a
@ -467,7 +467,7 @@ pub struct ExtensionsConfig {
|
|||||||
|
|
||||||
/// Request to receipt information with the given config.
|
/// Request to receipt information with the given config.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub receipt: Option<ReceiptConfig>,
|
pub receipts: Option<ReceiptsConfig>,
|
||||||
|
|
||||||
/// Request to typing information with the given config.
|
/// Request to typing information with the given config.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
@ -483,7 +483,7 @@ impl ExtensionsConfig {
|
|||||||
self.to_device.is_none()
|
self.to_device.is_none()
|
||||||
&& self.e2ee.is_none()
|
&& self.e2ee.is_none()
|
||||||
&& self.account_data.is_none()
|
&& self.account_data.is_none()
|
||||||
&& self.receipt.is_none()
|
&& self.receipts.is_none()
|
||||||
&& self.typing.is_none()
|
&& self.typing.is_none()
|
||||||
&& self.other.is_empty()
|
&& self.other.is_empty()
|
||||||
}
|
}
|
||||||
@ -507,7 +507,7 @@ pub struct Extensions {
|
|||||||
|
|
||||||
/// Receipt data extension in response.
|
/// Receipt data extension in response.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub receipt: Option<Receipt>,
|
pub receipts: Option<Receipts>,
|
||||||
|
|
||||||
/// Typing data extension in response.
|
/// Typing data extension in response.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
@ -522,7 +522,7 @@ impl Extensions {
|
|||||||
self.to_device.is_none()
|
self.to_device.is_none()
|
||||||
&& self.e2ee.is_none()
|
&& self.e2ee.is_none()
|
||||||
&& self.account_data.is_none()
|
&& self.account_data.is_none()
|
||||||
&& self.receipt.is_none()
|
&& self.receipts.is_none()
|
||||||
&& self.typing.is_none()
|
&& self.typing.is_none()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -627,11 +627,10 @@ pub struct AccountData {
|
|||||||
|
|
||||||
/// Receipt extension configuration.
|
/// 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)
|
||||||
/// <https://github.com/matrix-org/sliding-sync/blob/main/sync3/extensions/receipts.go>
|
|
||||||
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq)]
|
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
pub struct ReceiptConfig {
|
pub struct ReceiptsConfig {
|
||||||
/// Activate or deactivate this extension. Sticky.
|
/// Activate or deactivate this extension. Sticky.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub enabled: Option<bool>,
|
pub enabled: Option<bool>,
|
||||||
@ -639,11 +638,10 @@ pub struct ReceiptConfig {
|
|||||||
|
|
||||||
/// Receipt extension response data.
|
/// 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)
|
||||||
/// <https://github.com/matrix-org/sliding-sync/blob/main/sync3/extensions/receipts.go>
|
|
||||||
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
pub struct Receipt {
|
pub struct Receipts {
|
||||||
/// The empheral receipt room event for each room
|
/// The empheral receipt room event for each room
|
||||||
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
||||||
pub rooms: BTreeMap<OwnedRoomId, Raw<AnyEphemeralRoomEvent>>,
|
pub rooms: BTreeMap<OwnedRoomId, Raw<AnyEphemeralRoomEvent>>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user