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/RoomInfo/RoomAvatarEventContent.cs | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarEventContent.cs (limited to 'LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarEventContent.cs') diff --git a/LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarEventContent.cs b/LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarEventContent.cs new file mode 100644 index 0000000..bc70d65 --- /dev/null +++ b/LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarEventContent.cs @@ -0,0 +1,28 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.LegacyEvents.EventTypes.Spec.State.RoomInfo; + +[MatrixEvent(EventName = EventId)] +public class RoomAvatarEventContent : EventContent { + public const string EventId = "m.room.avatar"; + + [JsonPropertyName("url")] + public string? Url { get; set; } + + [JsonPropertyName("info")] + public RoomAvatarInfo? Info { get; set; } + + public class RoomAvatarInfo { + [JsonPropertyName("h")] + public int? Height { get; set; } + + [JsonPropertyName("w")] + public int? Width { get; set; } + + [JsonPropertyName("mimetype")] + public string? MimeType { get; set; } + + [JsonPropertyName("size")] + public int? Size { get; set; } + } +} \ No newline at end of file -- cgit 1.4.1