Do include content type on status API model actually
This is mostly important when deleting and redrafting. The comment on `apimodel.Status.Text` implies that it's not sent except in response to status deletion, but actually this doesn't seem to be the case; it also appears to be present in responses to creations and normal fetches and stuff. So I'm treating `ContentType` the same here.
This commit is contained in:
parent
f46583be48
commit
83de18aeba
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue