about summary refs log tree commit diff
path: root/LibMatrix.EventTypes/EventContent.cs
diff options
context:
space:
mode:
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; } = [];