about summary refs log tree commit diff
path: root/LibMatrix/StateEvent.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-02-08 21:03:41 +0100
committerRory& <root@rory.gay>2025-02-08 21:03:41 +0100
commitca3e6878422b7b55ae52b43f49f89a19546ea51c (patch)
treeae8b2724f9d43f88c1579cdade205876858a113c /LibMatrix/StateEvent.cs
parentUpdate ArcaneLibs (diff)
downloadLibMatrix-ca3e6878422b7b55ae52b43f49f89a19546ea51c.tar.xz
Temporary work
Diffstat (limited to '')
-rw-r--r--LibMatrix/StateEvent.cs37
1 files changed, 3 insertions, 34 deletions
diff --git a/LibMatrix/StateEvent.cs b/LibMatrix/StateEvent.cs
index cc870e4..6d8f195 100644
--- a/LibMatrix/StateEvent.cs
+++ b/LibMatrix/StateEvent.cs
@@ -107,37 +107,6 @@ public class StateEvent {
         get => _rawContent;
         set => _rawContent = value;
     }
-    //
-    // [JsonIgnore]
-    // public new Type GetType {
-    //     get {
-    //         var type = GetStateEventType(Type);
-    //
-    //         //special handling for some types
-    //         // if (type == typeof(RoomEmotesEventContent)) {
-    //         //     RawContent["emote"] = RawContent["emote"]?.AsObject() ?? new JsonObject();
-    //         // }
-    //         //
-    //         // if (this is StateEventResponse stateEventResponse) {
-    //         //     if (type == null || type == typeof(object)) {
-    //         //         Console.WriteLine($"Warning: unknown event type '{Type}'!");
-    //         //         Console.WriteLine(RawContent.ToJson());
-    //         //         Directory.CreateDirectory($"unknown_state_events/{Type}");
-    //         //         File.WriteAllText($"unknown_state_events/{Type}/{stateEventResponse.EventId}.json",
-    //         //             RawContent.ToJson());
-    //         //         Console.WriteLine($"Saved to unknown_state_events/{Type}/{stateEventResponse.EventId}.json");
-    //         //     }
-    //         //     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());
-    //         //         Console.WriteLine($"Saved to unknown_state_events/{Type}/{stateEventResponse.EventId}.json");
-    //         //     }
-    //         // }
-    //
-    //         return type;
-    //     }
-    // }
 
     //debug
     [JsonIgnore]
@@ -264,8 +233,6 @@ public class StateEventContentPolymorphicTypeInfoResolver : DefaultJsonTypeInfoR
 }
 */
 
-#endregion
-
 /*
 public class ForgivingObjectConverter<T> : JsonConverter<T> where T : new() {
     public override T? Read(ref Utf8JsonReader reader, Type type, JsonSerializerOptions options) {
@@ -283,4 +250,6 @@ public class ForgivingObjectConverter<T> : JsonConverter<T> where T : new() {
 
     public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
         => JsonSerializer.Serialize<T>(writer, value, options);
-}*/
\ No newline at end of file
+}*/
+
+#endregion
\ No newline at end of file