Merge branch 'main' into content_warning_fixes

This commit is contained in:
tobi 2025-03-07 10:52:56 +01:00
commit aa5713fc38
26 changed files with 572 additions and 26 deletions

View file

@ -66,11 +66,14 @@ func (p *Processor) Create(
// Generate new ID for status.
statusID := id.NewULID()
// Process incoming content type.
contentType := processContentType(form.ContentType, nil, requester.Settings.StatusContentType)
// Process incoming status content fields.
content, errWithCode := p.processContent(ctx,
requester,
statusID,
string(form.ContentType),
contentType,
form.Status,
form.SpoilerText,
form.Language,
@ -172,6 +175,7 @@ func (p *Processor) Create(
ContentWarning: content.ContentWarning,
Text: form.Status, // raw
ContentWarningText: contentWarningText, // raw
ContentType: contentType,
// Set gathered mentions.
MentionIDs: content.MentionIDs,