about summary refs log tree commit diff
path: root/LibMatrix.EventTypes/Spec/RoomMessageEventContent.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix.EventTypes/Spec/RoomMessageEventContent.cs')
-rw-r--r--LibMatrix.EventTypes/Spec/RoomMessageEventContent.cs3
1 files changed, 3 insertions, 0 deletions
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")]