mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 07:36:16 -06:00
Return a value from processContentType instead of modifying the existing status
Fixes an issue that was caught by the test I just added - the recorded edit would be marked with the *new* content type instead of the old one, which is obviously bad
This commit is contained in:
parent
8634358278
commit
921ba6481b
3 changed files with 19 additions and 23 deletions
|
|
@ -110,7 +110,7 @@ func (p *Processor) processContent(
|
|||
ctx context.Context,
|
||||
author *gtsmodel.Account,
|
||||
statusID string,
|
||||
contentType apimodel.StatusContentType,
|
||||
contentType gtsmodel.StatusContentType,
|
||||
content string,
|
||||
contentWarning string,
|
||||
language string,
|
||||
|
|
@ -149,11 +149,11 @@ func (p *Processor) processContent(
|
|||
switch contentType {
|
||||
|
||||
// Format status according to text/plain.
|
||||
case apimodel.StatusContentTypePlain:
|
||||
case gtsmodel.StatusContentTypePlain:
|
||||
format = p.formatter.FromPlain
|
||||
|
||||
// Format status according to text/markdown.
|
||||
case apimodel.StatusContentTypeMarkdown:
|
||||
case gtsmodel.StatusContentTypeMarkdown:
|
||||
format = p.formatter.FromMarkdown
|
||||
|
||||
// Unknown.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue