client-api: Don't serialize None as null in report_content

This commit is contained in:
Jonas Platte 2023-02-16 19:23:52 +01:00
parent 7a84fb2d3f
commit b50ef4864c
No known key found for this signature in database
GPG Key ID: AAA7A61F696C3E0C
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,9 @@
# [unreleased] # [unreleased]
Bug fixes:
- Don't serialize `None` as `null` in `report_content::v3::Request`
# 0.16.1 # 0.16.1
Improvements: Improvements:

View File

@ -35,11 +35,13 @@ pub mod v3 {
pub event_id: OwnedEventId, pub event_id: OwnedEventId,
/// Integer between -100 and 0 rating offensivness. /// Integer between -100 and 0 rating offensivness.
#[serde(skip_serializing_if = "Option::is_none")]
pub score: Option<Int>, pub score: Option<Int>,
/// Reason to report content. /// Reason to report content.
/// ///
/// May be blank. /// May be blank.
#[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<String>, pub reason: Option<String>,
} }