diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-13 01:49:10 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-13 01:49:10 +0200 |
commit | fc749b3e57098740377e6eabd5d010d133256fa5 (patch) | |
tree | cc97267a3d4222c910769e46bdb37c96c7c31531 /MatrixRoomUtils.Core/Responses/StateEventResponse.cs | |
parent | unknown changes (diff) | |
download | MatrixUtils-fc749b3e57098740377e6eabd5d010d133256fa5.tar.xz |
Improved many features
Diffstat (limited to 'MatrixRoomUtils.Core/Responses/StateEventResponse.cs')
-rw-r--r-- | MatrixRoomUtils.Core/Responses/StateEventResponse.cs | 26 |
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 |