[backend/masto-client] Always send text property on status entities (ISH-323)
This commit is contained in:
parent
c266cab4a6
commit
2c7490a304
2 changed files with 4 additions and 7 deletions
|
@ -125,7 +125,7 @@ public class NoteRenderer(
|
|||
ContentWarning = note.Cw ?? "",
|
||||
Visibility = StatusEntity.EncodeVisibility(note.Visibility),
|
||||
Content = content,
|
||||
Text = data?.Source == true ? text : null,
|
||||
Text = text,
|
||||
Mentions = mentions,
|
||||
IsPinned = pinned,
|
||||
Attachments = attachments,
|
||||
|
|
|
@ -9,6 +9,8 @@ namespace Iceshrimp.Backend.Controllers.Mastodon.Schemas.Entities;
|
|||
|
||||
public class StatusEntity : IEntity, ICloneable
|
||||
{
|
||||
[J("id")] public required string Id { get; set; }
|
||||
[J("text")] public required string? Text { get; set; }
|
||||
[J("content")] public required string? Content { get; set; }
|
||||
[J("uri")] public required string Uri { get; set; }
|
||||
[J("url")] public required string Url { get; set; }
|
||||
|
@ -32,10 +34,6 @@ public class StatusEntity : IEntity, ICloneable
|
|||
[J("spoiler_text")] public required string ContentWarning { get; set; }
|
||||
[J("visibility")] public required string Visibility { get; set; }
|
||||
|
||||
[J("text")]
|
||||
[JI(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public required string? Text { get; set; }
|
||||
|
||||
[J("pinned")]
|
||||
[JI(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public required bool? IsPinned { get; set; }
|
||||
|
@ -52,8 +50,7 @@ public class StatusEntity : IEntity, ICloneable
|
|||
[J("card")] public object? Card => null; //FIXME
|
||||
[J("application")] public object? Application => null; //FIXME
|
||||
|
||||
[J("language")] public string? Language => null; //FIXME
|
||||
[J("id")] public required string Id { get; set; }
|
||||
[J("language")] public string? Language => null; //FIXME
|
||||
|
||||
[JI] public string? MastoReplyUserId;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue