From 08f5483df2c01eba7c764cdaec94fca71e4976b8 Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 30 May 2024 09:31:29 +0000 Subject: Clarify LegacyEvent types --- .../Spec/State/Space/SpaceChildEventContent.cs | 17 +++++++++++++++++ .../Spec/State/Space/SpaceParentEventContent.cs | 14 ++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 LibMatrix.LegacyEvents.EventTypes/Spec/State/Space/SpaceChildEventContent.cs create mode 100644 LibMatrix.LegacyEvents.EventTypes/Spec/State/Space/SpaceParentEventContent.cs (limited to 'LibMatrix.LegacyEvents.EventTypes/Spec/State/Space') diff --git a/LibMatrix.LegacyEvents.EventTypes/Spec/State/Space/SpaceChildEventContent.cs b/LibMatrix.LegacyEvents.EventTypes/Spec/State/Space/SpaceChildEventContent.cs new file mode 100644 index 0000000..bd8ff64 --- /dev/null +++ b/LibMatrix.LegacyEvents.EventTypes/Spec/State/Space/SpaceChildEventContent.cs @@ -0,0 +1,17 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.LegacyEvents.EventTypes.Spec.State; + +[MatrixEvent(EventName = EventId)] +public class SpaceChildEventContent : EventContent { + public const string EventId = "m.space.child"; + + [JsonPropertyName("auto_join")] + public bool? AutoJoin { get; set; } + + [JsonPropertyName("via")] + public List? Via { get; set; } + + [JsonPropertyName("suggested")] + public bool? Suggested { get; set; } +} \ No newline at end of file diff --git a/LibMatrix.LegacyEvents.EventTypes/Spec/State/Space/SpaceParentEventContent.cs b/LibMatrix.LegacyEvents.EventTypes/Spec/State/Space/SpaceParentEventContent.cs new file mode 100644 index 0000000..4e9903f --- /dev/null +++ b/LibMatrix.LegacyEvents.EventTypes/Spec/State/Space/SpaceParentEventContent.cs @@ -0,0 +1,14 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.LegacyEvents.EventTypes.Spec.State; + +[MatrixEvent(EventName = EventId)] +public class SpaceParentEventContent : EventContent { + public const string EventId = "m.space.parent"; + + [JsonPropertyName("via")] + public string[]? Via { get; set; } + + [JsonPropertyName("canonical")] + public bool? Canonical { get; set; } +} \ No newline at end of file -- cgit 1.4.1