Remove unused parameters to ContentTypeToAPIContentType

This commit is contained in:
ewin 2025-03-06 10:01:06 -05:00
commit d71935dde0
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -24,6 +24,7 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
)
// Get gets the given status, taking account of privacy settings and blocks etc.
@ -56,6 +57,6 @@ func (p *Processor) SourceGet(ctx context.Context, requester *gtsmodel.Account,
ID: status.ID,
Text: status.Text,
SpoilerText: status.ContentWarning,
ContentType: p.converter.ContentTypeToAPIContentType(ctx, status.ContentType),
ContentType: typeutils.ContentTypeToAPIContentType(status.ContentType),
}, nil
}

View file

@ -1391,7 +1391,7 @@ func (c *Converter) baseStatusToFrontend(
Emojis: apiEmojis,
Card: nil, // TODO: implement cards
Text: s.Text,
ContentType: c.ContentTypeToAPIContentType(ctx, s.ContentType),
ContentType: ContentTypeToAPIContentType(s.ContentType),
InteractionPolicy: *apiInteractionPolicy,
}
@ -1628,7 +1628,7 @@ func (c *Converter) VisToAPIVis(ctx context.Context, m gtsmodel.Visibility) apim
}
// Converts a gts status content type into its api equivalent
func (c *Converter) ContentTypeToAPIContentType(ctx context.Context, m gtsmodel.StatusContentType) apimodel.StatusContentType {
func ContentTypeToAPIContentType(m gtsmodel.StatusContentType) apimodel.StatusContentType {
switch m {
case gtsmodel.StatusContentTypePlain:
return apimodel.StatusContentTypePlain