From 5affd9f061e75f6575a2fe6715f9e8757cfe87e8 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Thu, 14 Dec 2023 07:20:46 +0100 Subject: Cleanup --- .../Common/MjolnirShortcodeEventContent.cs | 9 +++++++++ .../Common/RoomEmotesEventContent.cs | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 LibMatrix.EventTypes/Common/MjolnirShortcodeEventContent.cs create mode 100644 LibMatrix.EventTypes/Common/RoomEmotesEventContent.cs (limited to 'LibMatrix.EventTypes/Common') diff --git a/LibMatrix.EventTypes/Common/MjolnirShortcodeEventContent.cs b/LibMatrix.EventTypes/Common/MjolnirShortcodeEventContent.cs new file mode 100644 index 0000000..7924a33 --- /dev/null +++ b/LibMatrix.EventTypes/Common/MjolnirShortcodeEventContent.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.EventTypes.Common; + +[MatrixEvent(EventName = "org.matrix.mjolnir.shortcode")] +public class MjolnirShortcodeEventContent : TimelineEventContent { + [JsonPropertyName("shortcode")] + public string? Shortcode { get; set; } +} diff --git a/LibMatrix.EventTypes/Common/RoomEmotesEventContent.cs b/LibMatrix.EventTypes/Common/RoomEmotesEventContent.cs new file mode 100644 index 0000000..bfe480e --- /dev/null +++ b/LibMatrix.EventTypes/Common/RoomEmotesEventContent.cs @@ -0,0 +1,22 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.EventTypes.Common; + +[MatrixEvent(EventName = "im.ponies.room_emotes")] +public class RoomEmotesEventContent : TimelineEventContent { + [JsonPropertyName("emoticons")] + public Dictionary? Emoticons { get; set; } + + [JsonPropertyName("images")] + public Dictionary? Images { get; set; } + + [JsonPropertyName("pack")] + public PackInfo? Pack { get; set; } + + public class EmoticonData { + [JsonPropertyName("url")] + public string? Url { get; set; } + } + + public class PackInfo; // TODO: Implement this +} -- cgit 1.4.1