about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/StateEvent.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-02 01:01:09 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-02 01:01:09 +0200
commitdef33cc092ae2c6defcc218b108b7c99cbfb8581 (patch)
treeba992ff8c30b7d4e8af0a78350e157e095455a18 /MatrixRoomUtils.Core/StateEvent.cs
parentDeduplicate some api calls (diff)
downloadMatrixUtils-def33cc092ae2c6defcc218b108b7c99cbfb8581.tar.xz
Prefetch room info
Diffstat (limited to 'MatrixRoomUtils.Core/StateEvent.cs')
-rw-r--r--MatrixRoomUtils.Core/StateEvent.cs6
1 files changed, 1 insertions, 5 deletions
diff --git a/MatrixRoomUtils.Core/StateEvent.cs b/MatrixRoomUtils.Core/StateEvent.cs

index 18b4632..901a194 100644 --- a/MatrixRoomUtils.Core/StateEvent.cs +++ b/MatrixRoomUtils.Core/StateEvent.cs
@@ -53,10 +53,6 @@ public class StateEvent { } } - public T1 GetContent<T1>() where T1 : IStateEventType { - return RawContent.Deserialize<T1>(); - } - [JsonIgnore] public Type GetType { get { @@ -81,7 +77,7 @@ public class StateEvent { RawContent.ToJson()); Console.WriteLine($"Saved to unknown_state_events/{Type}/{stateEventResponse.EventId}.json"); } - else if (RawContent.FindExtraJsonObjectFields(type)) { + else if (RawContent is not null && RawContent.FindExtraJsonObjectFields(type)) { Directory.CreateDirectory($"unknown_state_events/{Type}"); File.WriteAllText($"unknown_state_events/{Type}/{stateEventResponse.EventId}.json", RawContent.ToJson());