Make some booleans default to false

This commit is contained in:
Joscha 2022-06-20 09:29:51 +02:00
parent de7815f653
commit 04427f1378

View file

@ -55,7 +55,8 @@ pub struct Message {
/// If true, then the full content of this message is not included (see /// If true, then the full content of this message is not included (see
/// [`GetMessage`](super::GetMessage) to obtain the message with full /// [`GetMessage`](super::GetMessage) to obtain the message with full
/// content). /// content).
pub truncated: Option<bool>, #[serde(default)]
pub truncated: bool,
} }
/// The type of a packet. /// The type of a packet.
@ -254,9 +255,11 @@ pub struct SessionView {
/// Id of the session, unique across all sessions globally. /// Id of the session, unique across all sessions globally.
pub session_id: String, pub session_id: String,
/// If true, this session belongs to a member of staff. /// If true, this session belongs to a member of staff.
pub is_staff: Option<bool>, #[serde(default)]
pub is_staff: bool,
/// If true, this session belongs to a manager of the room. /// If true, this session belongs to a manager of the room.
pub is_manager: Option<bool>, #[serde(default)]
pub is_manager: bool,
/// For hosts and staff, the virtual address of the client. /// For hosts and staff, the virtual address of the client.
pub client_address: Option<String>, pub client_address: Option<String>,
/// For staff, the real address of the client. /// For staff, the real address of the client.