diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-07-02 01:01:09 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-07-02 01:01:09 +0200 |
commit | def33cc092ae2c6defcc218b108b7c99cbfb8581 (patch) | |
tree | ba992ff8c30b7d4e8af0a78350e157e095455a18 /MatrixRoomUtils.Core/StateEvent.cs | |
parent | Deduplicate some api calls (diff) | |
download | MatrixUtils-def33cc092ae2c6defcc218b108b7c99cbfb8581.tar.xz |
Prefetch room info
Diffstat (limited to 'MatrixRoomUtils.Core/StateEvent.cs')
-rw-r--r-- | MatrixRoomUtils.Core/StateEvent.cs | 6 |
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()); |