about summary refs log tree commit diff
path: root/LibMatrix/Extensions/JsonElementExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix/Extensions/JsonElementExtensions.cs')
-rw-r--r--LibMatrix/Extensions/JsonElementExtensions.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/LibMatrix/Extensions/JsonElementExtensions.cs b/LibMatrix/Extensions/JsonElementExtensions.cs
index c4ed743..a2faddc 100644
--- a/LibMatrix/Extensions/JsonElementExtensions.cs
+++ b/LibMatrix/Extensions/JsonElementExtensions.cs
@@ -8,7 +8,7 @@ namespace LibMatrix.Extensions;
 public static class JsonElementExtensions {
     public static bool FindExtraJsonElementFields(this JsonElement obj, Type objectType, string objectPropertyName) {
         if (objectPropertyName == "content" && objectType == typeof(JsonObject))
-            objectType = typeof(StateEventResponse);
+            objectType = typeof(LegacyMatrixEventResponse);
         // if (t == typeof(JsonNode))
         //     return false;
 
@@ -35,9 +35,9 @@ public static class JsonElementExtensions {
                     continue;
                 }
 
-                if (field.Name == "content" && (objectType == typeof(StateEventResponse) || objectType == typeof(StateEvent))) {
+                if (field.Name == "content" && (objectType == typeof(LegacyMatrixEventResponse) || objectType == typeof(LegacyMatrixEvent))) {
                     unknownPropertyFound |= field.FindExtraJsonPropertyFieldsByValueKind(
-                        StateEvent.GetStateEventType(obj.GetProperty("type").GetString()!), // We expect type to always be present
+                        LegacyMatrixEvent.GetStateEventType(obj.GetProperty("type").GetString()!), // We expect type to always be present
                         mappedProperty.PropertyType);
                     continue;
                 }