client-api: Make score and reason optional in room::report_content::Request

This commit is contained in:
Kévin Commaille 2022-02-22 19:23:43 +01:00 committed by GitHub
parent 412452ea2e
commit f78ae4ddde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,12 +31,12 @@ pub mod v3 {
pub event_id: &'a EventId,
/// Integer between -100 and 0 rating offensivness.
pub score: Int,
pub score: Option<Int>,
/// Reason to report content.
///
/// May be blank.
pub reason: &'a str,
pub reason: Option<&'a str>,
}
#[derive(Default)]
@ -50,8 +50,8 @@ pub mod v3 {
pub fn new(
room_id: &'a RoomId,
event_id: &'a EventId,
score: Int,
reason: &'a str,
score: Option<Int>,
reason: Option<&'a str>,
) -> Self {
Self { room_id, event_id, score, reason }
}