Convert processContentType to free function and remove unused parameter

This commit is contained in:
ewin 2025-03-05 17:35:10 -05:00
commit 11c1c837cc
No known key found for this signature in database

View file

@ -86,7 +86,7 @@ func (p *Processor) Edit(
}
// Process incoming content type
contentType := p.processContentType(ctx, form, status, requester.Settings.StatusContentType)
contentType := processContentType(form, status, requester.Settings.StatusContentType)
// Process incoming status edit content fields.
content, errWithCode := p.processContent(ctx,
@ -349,8 +349,7 @@ func (p *Processor) Edit(
}
// Returns the new content type of the status when applying an edit.
func (p *Processor) processContentType(
ctx context.Context,
func processContentType(
form *apimodel.StatusEditRequest,
status *gtsmodel.Status,
accountDefaultContentType string,