From def33cc092ae2c6defcc218b108b7c99cbfb8581 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sun, 2 Jul 2023 01:01:09 +0200 Subject: Prefetch room info --- MatrixRoomUtils.Core/StateEvent.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'MatrixRoomUtils.Core/StateEvent.cs') 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() where T1 : IStateEventType { - return RawContent.Deserialize(); - } - [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()); -- cgit 1.4.1