Sync endpoint touchups
* Add account_data to sync endpoint. * Update RoomSummary not to serialize empty optional fields
This commit is contained in:
parent
15cb930102
commit
dbb60142cf
@ -26,6 +26,7 @@ Breaking changes:
|
|||||||
* Add `M_USER_DEACTIVATED` to `error::ErrorKind`
|
* Add `M_USER_DEACTIVATED` to `error::ErrorKind`
|
||||||
* Make `display_name` field of `r0::membership::joined_events::RoomMember` optional
|
* Make `display_name` field of `r0::membership::joined_events::RoomMember` optional
|
||||||
* Update `r0::search::search_events` to r0.6.0
|
* Update `r0::search::search_events` to r0.6.0
|
||||||
|
* Add `account_data` field to `r0::sync::sync_events`
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
@ -66,6 +66,8 @@ ruma_api! {
|
|||||||
pub rooms: Rooms,
|
pub rooms: Rooms,
|
||||||
/// Updates to the presence status of other users.
|
/// Updates to the presence status of other users.
|
||||||
pub presence: Presence,
|
pub presence: Presence,
|
||||||
|
/// The global private data created by this user.
|
||||||
|
pub account_data: AccountData,
|
||||||
/// Messages sent dirrectly between devices.
|
/// Messages sent dirrectly between devices.
|
||||||
#[serde(default, skip_serializing_if = "ToDevice::is_empty")]
|
#[serde(default, skip_serializing_if = "ToDevice::is_empty")]
|
||||||
pub to_device: ToDevice,
|
pub to_device: ToDevice,
|
||||||
@ -223,12 +225,18 @@ pub struct RoomSummary {
|
|||||||
/// Number of users whose membership status is `join`.
|
/// Number of users whose membership status is `join`.
|
||||||
/// Required if field has changed since last sync; otherwise, it may be
|
/// Required if field has changed since last sync; otherwise, it may be
|
||||||
/// omitted.
|
/// omitted.
|
||||||
#[serde(rename = "m.joined_member_count")]
|
#[serde(
|
||||||
|
rename = "m.joined_member_count",
|
||||||
|
skip_serializing_if = "Option::is_none"
|
||||||
|
)]
|
||||||
pub joined_member_count: Option<UInt>,
|
pub joined_member_count: Option<UInt>,
|
||||||
/// Number of users whose membership status is `invite`.
|
/// Number of users whose membership status is `invite`.
|
||||||
/// Required if field has changed since last sync; otherwise, it may be
|
/// Required if field has changed since last sync; otherwise, it may be
|
||||||
/// omitted.
|
/// omitted.
|
||||||
#[serde(rename = "m.invited_member_count")]
|
#[serde(
|
||||||
|
rename = "m.invited_member_count",
|
||||||
|
skip_serializing_if = "Option::is_none"
|
||||||
|
)]
|
||||||
pub invited_member_count: Option<UInt>,
|
pub invited_member_count: Option<UInt>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user