1 files changed, 10 insertions, 2 deletions
diff --git a/LibMatrix/StateEvent.cs b/LibMatrix/StateEvent.cs
index dbb3401..3e8c4b5 100644
--- a/LibMatrix/StateEvent.cs
+++ b/LibMatrix/StateEvent.cs
@@ -36,6 +36,7 @@ public class StateEvent {
return eventType ?? typeof(UnknownEventContent);
}
+ [JsonIgnore]
public EventContent TypedContent {
get {
if(Type == "m.receipt") {
@@ -134,6 +135,7 @@ public class StateEvent {
public string cdtype => TypedContent.GetType().Name;
}
+
public class StateEventResponse : StateEvent {
[JsonPropertyName("origin_server_ts")]
public ulong OriginServerTs { get; set; }
@@ -150,8 +152,8 @@ public class StateEventResponse : StateEvent {
[JsonPropertyName("event_id")]
public string EventId { get; set; }
- [JsonPropertyName("user_id")]
- public string UserId { get; set; }
+ // [JsonPropertyName("user_id")]
+ // public string UserId { get; set; }
[JsonPropertyName("replaces_state")]
public new string ReplacesState { get; set; }
@@ -177,6 +179,12 @@ public class StateEventResponse : StateEvent {
}
}
+[JsonSourceGenerationOptions(WriteIndented = true)]
+[JsonSerializable(typeof(ChunkedStateEventResponse))]
+internal partial class ChunkedStateEventResponseSerializerContext : JsonSerializerContext
+{
+}
+
public class EventList {
[JsonPropertyName("events")]
public List<StateEventResponse>? Events { get; set; } = new();
|