diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-15 09:50:45 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-15 09:50:45 +0200 |
commit | 6bd02248ccfbcb46960a6f39eaad23888d190eb5 (patch) | |
tree | 110578f31b6f9f70a7a1edab32fb3a34d6ad4f1a /LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs | |
parent | Media moderator PoC works, abstract command handling to library (diff) | |
download | LibMatrix-6bd02248ccfbcb46960a6f39eaad23888d190eb5.tar.xz |
Some refactoring
Diffstat (limited to 'LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs')
-rw-r--r-- | LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs index d13c273..a15efe8 100644 --- a/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs +++ b/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs @@ -6,19 +6,12 @@ using LibMatrix.Interfaces; namespace LibMatrix.StateEventTypes.Spec; [MatrixEvent(EventName = "m.room.message")] -public class RoomMessageEventData : IStateEventType { - public RoomMessageEventData() { } - - public RoomMessageEventData(string messageType, string body) { +public class RoomMessageEventContent : EventContent { + public RoomMessageEventContent(string? messageType = "m.notice", string? body = null) { MessageType = messageType; Body = body; } - public RoomMessageEventData(string body) : this() { - Body = body; - MessageType = "m.notice"; - } - [JsonPropertyName("body")] public string Body { get; set; } @@ -31,22 +24,9 @@ public class RoomMessageEventData : IStateEventType { [JsonPropertyName("format")] public string Format { get; set; } - [JsonPropertyName("m.relates_to")] - public MessageRelatesTo? RelatesTo { get; set; } - /// <summary> /// Media URI for this message, if any /// </summary> [JsonPropertyName("url")] public string? Url { get; set; } - - public class MessageRelatesTo { - [JsonPropertyName("m.in_reply_to")] - public MessageInReplyTo? InReplyTo { get; set; } - - public class MessageInReplyTo { - [JsonPropertyName("event_id")] - public string EventId { get; set; } - } - } } |