mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 00:16:16 -06:00
ensure ContentType is updated anywhere Text is
This commit is contained in:
parent
8eeede9c35
commit
cd53543ec1
4 changed files with 4 additions and 3 deletions
1
internal/cache/size.go
vendored
1
internal/cache/size.go
vendored
|
|
@ -649,6 +649,7 @@ func sizeofStatus() uintptr {
|
|||
URL: exampleURI,
|
||||
Content: exampleText,
|
||||
Text: exampleText,
|
||||
ContentType: gtsmodel.StatusContentTypePlain,
|
||||
AttachmentIDs: []string{exampleID, exampleID, exampleID},
|
||||
TagIDs: []string{exampleID, exampleID, exampleID},
|
||||
MentionIDs: []string{},
|
||||
|
|
|
|||
|
|
@ -1239,6 +1239,7 @@ func (d *Dereferencer) handleStatusEdit(
|
|||
edit.Content = existing.Content
|
||||
edit.ContentWarning = existing.ContentWarning
|
||||
edit.Text = existing.Text
|
||||
edit.ContentType = existing.ContentType
|
||||
edit.Language = existing.Language
|
||||
edit.Sensitive = existing.Sensitive
|
||||
edit.StatusID = status.ID
|
||||
|
|
|
|||
|
|
@ -170,13 +170,11 @@ func (p *Processor) Create(
|
|||
// Set validated language.
|
||||
Language: content.Language,
|
||||
|
||||
// Set resolved content type.
|
||||
ContentType: typeutils.APIContentTypeToContentType(contentType),
|
||||
|
||||
// Set formatted status content.
|
||||
Content: content.Content,
|
||||
ContentWarning: content.ContentWarning,
|
||||
Text: form.Status, // raw
|
||||
ContentType: typeutils.APIContentTypeToContentType(contentType),
|
||||
|
||||
// Set gathered mentions.
|
||||
MentionIDs: content.MentionIDs,
|
||||
|
|
|
|||
|
|
@ -303,6 +303,7 @@ func (p *Processor) Edit(
|
|||
status.Content = content.Content
|
||||
status.ContentWarning = content.ContentWarning
|
||||
status.Text = form.Status
|
||||
status.ContentType = typeutils.APIContentTypeToContentType(form.ContentType)
|
||||
status.Language = content.Language
|
||||
status.Sensitive = &form.Sensitive
|
||||
status.AttachmentIDs = form.MediaIDs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue