diff --git a/internal/api/model/status.go b/internal/api/model/status.go index 286a90dfe..d5fec77a7 100644 --- a/internal/api/model/status.go +++ b/internal/api/model/status.go @@ -110,6 +110,10 @@ type Status struct { // so the user may redraft from the source text without the client having to reverse-engineer // the original text from the HTML content. Text string `json:"text,omitempty"` + // Content type that was used to parse the status's text. Returned when + // status is deleted, so if the user is redrafting the message the client + // can default to the same content type. + ContentType StatusContentType `json:"content_type,omitempty"` // A list of filters that matched this status and why they matched, if there are any such filters. Filtered []FilterResult `json:"filtered,omitempty"` // The interaction policy for this status, as set by the status author. diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index 465f4acf5..1e8e410e1 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -1391,6 +1391,7 @@ func (c *Converter) baseStatusToFrontend( Emojis: apiEmojis, Card: nil, // TODO: implement cards Text: s.Text, + ContentType: c.ContentTypeToAPIContentType(ctx, s.ContentType), InteractionPolicy: *apiInteractionPolicy, }