diff --git a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASActor.cs b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASActor.cs index 7e8b2e8e..72261e5c 100644 --- a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASActor.cs +++ b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASActor.cs @@ -3,6 +3,7 @@ using Iceshrimp.Backend.Core.Configuration; using Iceshrimp.Backend.Core.Extensions; using J = Newtonsoft.Json.JsonPropertyAttribute; using JC = Newtonsoft.Json.JsonConverterAttribute; +using JI = Newtonsoft.Json.JsonIgnoreAttribute; using VC = Iceshrimp.Backend.Core.Federation.ActivityStreams.Types.ValueObjectConverter; namespace Iceshrimp.Backend.Core.Federation.ActivityStreams.Types; @@ -125,7 +126,7 @@ public class ASActor : ASObject [JC(typeof(ASAttachmentConverter))] public List? Attachments { get; set; } - public bool IsBot => Type == $"{Constants.ActivityStreamsNs}#Service"; + [JI] public bool IsBot => Type == $"{Constants.ActivityStreamsNs}#Service"; public void Normalize(string uri, string acct) { diff --git a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASLink.cs b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASLink.cs index 27177a39..2e5904e3 100644 --- a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASLink.cs +++ b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASLink.cs @@ -1,6 +1,7 @@ using Iceshrimp.Backend.Core.Configuration; using J = Newtonsoft.Json.JsonPropertyAttribute; using JC = Newtonsoft.Json.JsonConverterAttribute; +using JI = Newtonsoft.Json.JsonIgnoreAttribute; namespace Iceshrimp.Backend.Core.Federation.ActivityStreams.Types; @@ -14,7 +15,7 @@ public class ASLink(string url) : ASObjectBase(url) [JC(typeof(ValueObjectConverter))] public string? Name { get; set; } - public string? Link => Id ?? Href?.Id; + [JI] public string? Link => Id ?? Href?.Id; public override string? ToString() => Link; } diff --git a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASNote.cs b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASNote.cs index eb76efe2..50a7ea74 100644 --- a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASNote.cs +++ b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASNote.cs @@ -2,6 +2,7 @@ using Iceshrimp.Backend.Core.Configuration; using Iceshrimp.Backend.Core.Database.Tables; using J = Newtonsoft.Json.JsonPropertyAttribute; using JC = Newtonsoft.Json.JsonConverterAttribute; +using JI = Newtonsoft.Json.JsonIgnoreAttribute; using VC = Iceshrimp.Backend.Core.Federation.ActivityStreams.Types.ValueObjectConverter; namespace Iceshrimp.Backend.Core.Federation.ActivityStreams.Types; @@ -10,7 +11,8 @@ public class ASNote : ASObject { public ASNote(bool withType = true) => Type = withType ? Types.Note : null; - public bool VerifiedFetch = false; + [JI] public bool VerifiedFetch = false; + private string? _mkContent; [J("https://misskey-hub.net/ns#_misskey_content")] diff --git a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASObject.cs b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASObject.cs index 6db1ab29..994774ac 100644 --- a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASObject.cs +++ b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASObject.cs @@ -4,6 +4,7 @@ using Newtonsoft.Json.Linq; using J = Newtonsoft.Json.JsonPropertyAttribute; using JC = Newtonsoft.Json.JsonConverterAttribute; using JR = Newtonsoft.Json.JsonRequiredAttribute; +using JI = Newtonsoft.Json.JsonIgnoreAttribute; namespace Iceshrimp.Backend.Core.Federation.ActivityStreams.Types; @@ -21,7 +22,7 @@ public class ASObject : ASObjectBase [JC(typeof(StringListSingleConverter))] public string? Type { get; set; } - [JsonIgnore] public bool IsUnresolved => GetType() == typeof(ASObject) && Type == null; + [JI] public bool IsUnresolved => GetType() == typeof(ASObject) && Type == null; //FIXME: don't recurse creates and co public static ASObject? Deserialize(JToken token)