[backend/masto-client] Fix rendering of statuses with no text in applications that rely on a null value being present

This commit is contained in:
Laura Hausmann 2024-02-29 04:15:37 +01:00
parent b4e3fdc898
commit 0b6ac41257
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -12,6 +12,7 @@ public class StatusEntity : IEntity
[J("text")] [JI(Condition = JsonIgnoreCondition.WhenWritingNull)]
public required string? Text;
[J("content")] public required string? Content { get; set; }
[J("uri")] public required string Uri { get; set; }
[J("url")] public required string Url { get; set; }
[J("account")] public required AccountEntity Account { get; set; }
@ -33,10 +34,6 @@ public class StatusEntity : IEntity
[J("spoiler_text")] public required string ContentWarning { get; set; }
[J("visibility")] public required string Visibility { get; set; }
[J("content")]
[JI(Condition = JsonIgnoreCondition.WhenWritingNull)]
public required string? Content { get; set; }
[J("pinned")]
[JI(Condition = JsonIgnoreCondition.WhenWritingNull)]
public required bool? IsPinned { get; set; }