From 096375344ef87fe53ca009b7a7eaa34c9c9f5407 Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 15 Mar 2024 18:10:58 +0100 Subject: Bot changes, move named filters to subclass --- LibMatrix.EventTypes/Spec/RoomMessageEventContent.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'LibMatrix.EventTypes') diff --git a/LibMatrix.EventTypes/Spec/RoomMessageEventContent.cs b/LibMatrix.EventTypes/Spec/RoomMessageEventContent.cs index f3e3f4f..f87fa62 100644 --- a/LibMatrix.EventTypes/Spec/RoomMessageEventContent.cs +++ b/LibMatrix.EventTypes/Spec/RoomMessageEventContent.cs @@ -33,6 +33,9 @@ public class RoomMessageEventContent : TimelineEventContent { [JsonPropertyName("info")] public FileInfoStruct? FileInfo { get; set; } + + [JsonIgnore] + public string BodyWithoutReplyFallback => Body.Split('\n').SkipWhile(x => x.StartsWith(">")).SkipWhile(x=>x.Trim().Length == 0).Aggregate((x, y) => $"{x}\n{y}"); public class FileInfoStruct { [JsonPropertyName("mimetype")] -- cgit 1.4.1