mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 03: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,
|
URL: exampleURI,
|
||||||
Content: exampleText,
|
Content: exampleText,
|
||||||
Text: exampleText,
|
Text: exampleText,
|
||||||
|
ContentType: gtsmodel.StatusContentTypePlain,
|
||||||
AttachmentIDs: []string{exampleID, exampleID, exampleID},
|
AttachmentIDs: []string{exampleID, exampleID, exampleID},
|
||||||
TagIDs: []string{exampleID, exampleID, exampleID},
|
TagIDs: []string{exampleID, exampleID, exampleID},
|
||||||
MentionIDs: []string{},
|
MentionIDs: []string{},
|
||||||
|
|
|
||||||
|
|
@ -1239,6 +1239,7 @@ func (d *Dereferencer) handleStatusEdit(
|
||||||
edit.Content = existing.Content
|
edit.Content = existing.Content
|
||||||
edit.ContentWarning = existing.ContentWarning
|
edit.ContentWarning = existing.ContentWarning
|
||||||
edit.Text = existing.Text
|
edit.Text = existing.Text
|
||||||
|
edit.ContentType = existing.ContentType
|
||||||
edit.Language = existing.Language
|
edit.Language = existing.Language
|
||||||
edit.Sensitive = existing.Sensitive
|
edit.Sensitive = existing.Sensitive
|
||||||
edit.StatusID = status.ID
|
edit.StatusID = status.ID
|
||||||
|
|
|
||||||
|
|
@ -170,13 +170,11 @@ func (p *Processor) Create(
|
||||||
// Set validated language.
|
// Set validated language.
|
||||||
Language: content.Language,
|
Language: content.Language,
|
||||||
|
|
||||||
// Set resolved content type.
|
|
||||||
ContentType: typeutils.APIContentTypeToContentType(contentType),
|
|
||||||
|
|
||||||
// Set formatted status content.
|
// Set formatted status content.
|
||||||
Content: content.Content,
|
Content: content.Content,
|
||||||
ContentWarning: content.ContentWarning,
|
ContentWarning: content.ContentWarning,
|
||||||
Text: form.Status, // raw
|
Text: form.Status, // raw
|
||||||
|
ContentType: typeutils.APIContentTypeToContentType(contentType),
|
||||||
|
|
||||||
// Set gathered mentions.
|
// Set gathered mentions.
|
||||||
MentionIDs: content.MentionIDs,
|
MentionIDs: content.MentionIDs,
|
||||||
|
|
|
||||||
|
|
@ -303,6 +303,7 @@ func (p *Processor) Edit(
|
||||||
status.Content = content.Content
|
status.Content = content.Content
|
||||||
status.ContentWarning = content.ContentWarning
|
status.ContentWarning = content.ContentWarning
|
||||||
status.Text = form.Status
|
status.Text = form.Status
|
||||||
|
status.ContentType = typeutils.APIContentTypeToContentType(form.ContentType)
|
||||||
status.Language = content.Language
|
status.Language = content.Language
|
||||||
status.Sensitive = &form.Sensitive
|
status.Sensitive = &form.Sensitive
|
||||||
status.AttachmentIDs = form.MediaIDs
|
status.AttachmentIDs = form.MediaIDs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue