mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 03:06:14 -06:00
Remove unused parameters to ContentTypeToAPIContentType
This commit is contained in:
parent
d83cf7ed9b
commit
d71935dde0
2 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue