about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Responses/StateEventResponse.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Core/Responses/StateEventResponse.cs')
-rw-r--r--MatrixRoomUtils.Core/Responses/StateEventResponse.cs26
1 files changed, 17 insertions, 9 deletions
diff --git a/MatrixRoomUtils.Core/Responses/StateEventResponse.cs b/MatrixRoomUtils.Core/Responses/StateEventResponse.cs
index 1af3e1f..670c121 100644
--- a/MatrixRoomUtils.Core/Responses/StateEventResponse.cs
+++ b/MatrixRoomUtils.Core/Responses/StateEventResponse.cs
@@ -2,22 +2,16 @@ using System.Text.Json.Serialization;
 
 namespace MatrixRoomUtils.Core;
 
-public class StateEventResponse
+public class StateEventResponse : StateEvent
 {
-    [JsonPropertyName("content")]
-    public dynamic Content { get; set; }
     [JsonPropertyName("origin_server_ts")]
-    public long OriginServerTs { get; set; }
+    public ulong OriginServerTs { get; set; }
     [JsonPropertyName("room_id")]
     public string RoomId { get; set; }
     [JsonPropertyName("sender")]
     public string Sender { get; set; }
-    [JsonPropertyName("state_key")]
-    public string StateKey { get; set; }
-    [JsonPropertyName("type")]
-    public string Type { get; set; }
     [JsonPropertyName("unsigned")]
-    public dynamic Unsigned { get; set; }
+    public UnsignedData? Unsigned { get; set; }
     [JsonPropertyName("event_id")]
     public string EventId { get; set; }
     [JsonPropertyName("user_id")]
@@ -26,6 +20,20 @@ public class StateEventResponse
     public string ReplacesState { get; set; }
     [JsonPropertyName("prev_content")]
     public dynamic PrevContent { get; set; }
+    
+    
+    public class UnsignedData
+    {
+        [JsonPropertyName("age")]
+        public ulong Age { get; set; }
+        [JsonPropertyName("prev_content")]
+        public dynamic? PrevContent { get; set; }
+        [JsonPropertyName("redacted_because")]
+        public dynamic? RedactedBecause { get; set; }
+        [JsonPropertyName("transaction_id")]
+        public string? TransactionId { get; set; }
+        
+    }
 }
 
 public class StateEventResponse<T> : StateEventResponse where T : class