From 60d12470c945b423519bac798986340841bd963f Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 23 Nov 2020 19:32:28 +0100 Subject: [PATCH] events: Allow missing fields in m.room.third_party_invite under `unstable-synapse-quirks` --- ruma-events/src/room/third_party_invite.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruma-events/src/room/third_party_invite.rs b/ruma-events/src/room/third_party_invite.rs index f32657f7..fd9b4943 100644 --- a/ruma-events/src/room/third_party_invite.rs +++ b/ruma-events/src/room/third_party_invite.rs @@ -17,12 +17,15 @@ pub type ThirdPartyInviteEvent = StateEvent; #[ruma_event(type = "m.room.third_party_invite")] pub struct ThirdPartyInviteEventContent { /// A user-readable string which represents the user who has been invited. + #[cfg_attr(feature = "unstable-synapse-quirks", serde(default))] pub display_name: String, /// A URL which can be fetched to validate whether the key has been revoked. + #[cfg_attr(feature = "unstable-synapse-quirks", serde(default))] pub key_validity_url: String, /// A Base64-encoded Ed25519 key with which the token must be signed. + #[cfg_attr(feature = "unstable-synapse-quirks", serde(default))] pub public_key: String, /// Keys with which the token may be signed.