From 30a0868789466012bab869af4300aef5a9cac108 Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 30 May 2024 09:46:43 +0000 Subject: Rename legacy event types --- .../State/RoomInfo/RoomAvatarLegacyEventContent.cs | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarLegacyEventContent.cs (limited to 'LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarLegacyEventContent.cs') diff --git a/LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarLegacyEventContent.cs b/LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarLegacyEventContent.cs new file mode 100644 index 0000000..99d8b39 --- /dev/null +++ b/LibMatrix.LegacyEvents.EventTypes/Spec/State/RoomInfo/RoomAvatarLegacyEventContent.cs @@ -0,0 +1,28 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.LegacyEvents.EventTypes.Spec.State.RoomInfo; + +[LegacyMatrixEvent(EventName = EventId)] +public class RoomAvatarLegacyEventContent : LegacyEventContent { + 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