about summary refs log tree commit diff
path: root/LibMatrix.EventTypes/EventContent.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-11-17 12:10:28 +0100
committerRory& <root@rory.gay>2025-11-17 12:10:28 +0100
commit5db1a4d94b7f7a35f89bae78852ac31ab4bc29bf (patch)
tree678554eabd09e9322b25280b48e7f7ddadfe8b37 /LibMatrix.EventTypes/EventContent.cs
parentnix: fix builds (diff)
downloadLibMatrix-5db1a4d94b7f7a35f89bae78852ac31ab4bc29bf.tar.xz
Event content redaction (v12)
Diffstat (limited to 'LibMatrix.EventTypes/EventContent.cs')
-rw-r--r--LibMatrix.EventTypes/EventContent.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/LibMatrix.EventTypes/EventContent.cs b/LibMatrix.EventTypes/EventContent.cs

index d612e44..7a9f0aa 100644 --- a/LibMatrix.EventTypes/EventContent.cs +++ b/LibMatrix.EventTypes/EventContent.cs
@@ -1,4 +1,5 @@ using System.Diagnostics.CodeAnalysis; +using System.Net.Http.Json; using System.Reflection; using System.Text.Json; using System.Text.Json.Nodes; @@ -17,6 +18,7 @@ public abstract class EventContent { foreach (var attr in type.GetCustomAttributes<MatrixEventAttribute>(true)) { eventTypes.Add(attr.EventName); } + return eventTypes; } } @@ -55,7 +57,7 @@ public abstract class TimelineEventContent : EventContent { // used for reactions [JsonPropertyName("key")] public string? Key { get; set; } - + [JsonExtensionData] public Dictionary<string, object>? AdditionalData { get; set; } = [];