From 9b91529e36a48cc65be36224452a5b887e9fa2ea Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 1 May 2020 16:33:28 +0200 Subject: [PATCH] Update serde attrs in call::hangup --- src/call/hangup.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/call/hangup.rs b/src/call/hangup.rs index 4174c4b7..6ca4d100 100644 --- a/src/call/hangup.rs +++ b/src/call/hangup.rs @@ -18,6 +18,7 @@ ruma_event! { pub version: UInt, /// Optional error reason for the hangup. + #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, }, } @@ -29,13 +30,12 @@ ruma_event! { /// error in the call negotiation, this should be `ice_failed` for when ICE negotiation fails or /// `invite_timeout` for when the other party did not answer in time. #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)] +#[serde(rename_all = "snake_case")] pub enum Reason { /// ICE negotiation failure. - #[serde(rename = "ice_failed")] IceFailed, /// Party did not answer in time. - #[serde(rename = "invite_timeout")] InviteTimeout, /// Additional variants may be added in the future and will not be considered breaking changes