Fix create_room and sync_events deserialization

This commit is contained in:
timokoesters 2020-04-06 12:23:17 +02:00
parent 6fba4a5617
commit d6e4bd9ddc
No known key found for this signature in database
GPG Key ID: 356E705610F626D5
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ ruma_api! {
/// ///
/// Takes precedence over events set by preset, but gets overriden by /// Takes precedence over events set by preset, but gets overriden by
/// name and topic keys. /// name and topic keys.
#[serde(skip_serializing_if = "Vec::is_empty")] #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub initial_state: Vec<InitialStateEvent>, pub initial_state: Vec<InitialStateEvent>,
/// A list of user IDs to invite to the room. /// A list of user IDs to invite to the room.
/// ///

View File

@ -82,7 +82,7 @@ ruma_api! {
pub device_lists: Option<DeviceLists>, pub device_lists: Option<DeviceLists>,
/// For each key algorithm, the number of unclaimed one-time keys /// For each key algorithm, the number of unclaimed one-time keys
/// currently held on the server for a device. /// currently held on the server for a device.
#[serde(skip_serializing_if = "HashMap::is_empty")] #[serde(default, skip_serializing_if = "HashMap::is_empty")]
pub device_one_time_keys_count: HashMap<KeyAlgorithm, UInt>, pub device_one_time_keys_count: HashMap<KeyAlgorithm, UInt>,
} }