From 9dcce18cda5317ea1150eed06d6589b6285577e6 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 4 Sep 2023 06:29:00 +0200 Subject: Add start of Media Moderator PoC bot --- LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs | 4 ++++ .../StateEventTypes/Spec/RoomMessageEventData.cs | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'LibMatrix/StateEventTypes') diff --git a/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs b/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs index d3da559..08e8f22 100644 --- a/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs +++ b/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs @@ -12,6 +12,10 @@ public class JoinRulesEventData : IStateEventType { private static string Invite = "invite"; private static string Knock = "knock"; + /// + /// one of ["public", "invite", "knock", "restricted", "knock_restricted"] + /// "private" is reserved without implementation! + /// [JsonPropertyName("join_rule")] public string JoinRule { get; set; } diff --git a/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs index 5d65237..11a0e82 100644 --- a/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs +++ b/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs @@ -17,4 +17,24 @@ public class RoomMessageEventData : IStateEventType { [JsonPropertyName("format")] public string Format { get; set; } + + [JsonPropertyName("m.relates_to")] + public MessageRelatesTo? RelatesTo { get; set; } + + /// + /// Media URI for this message, if any + /// + [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; } + } + } } -- cgit 1.4.1