about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Responses/StateEventResponse.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-13 01:49:10 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-13 01:49:10 +0200
commitfc749b3e57098740377e6eabd5d010d133256fa5 (patch)
treecc97267a3d4222c910769e46bdb37c96c7c31531 /MatrixRoomUtils.Core/Responses/StateEventResponse.cs
parentunknown changes (diff)
downloadMatrixUtils-fc749b3e57098740377e6eabd5d010d133256fa5.tar.xz
Improved many features
Diffstat (limited to '')
-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