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`
|
||||
* Make `display_name` field of `r0::membership::joined_events::RoomMember` optional
|
||||
* Update `r0::search::search_events` to r0.6.0
|
||||
* Add `account_data` field to `r0::sync::sync_events`
|
||||
|
||||
Improvements:
|
||||
|
||||
|
@ -66,6 +66,8 @@ ruma_api! {
|
||||
pub rooms: Rooms,
|
||||
/// Updates to the presence status of other users.
|
||||
pub presence: Presence,
|
||||
/// The global private data created by this user.
|
||||
pub account_data: AccountData,
|
||||
/// Messages sent dirrectly between devices.
|
||||
#[serde(default, skip_serializing_if = "ToDevice::is_empty")]
|
||||
pub to_device: ToDevice,
|
||||
@ -223,12 +225,18 @@ pub struct RoomSummary {
|
||||
/// Number of users whose membership status is `join`.
|
||||
/// Required if field has changed since last sync; otherwise, it may be
|
||||
/// 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>,
|
||||
/// Number of users whose membership status is `invite`.
|
||||
/// Required if field has changed since last sync; otherwise, it may be
|
||||
/// 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>,
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user