mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] deinterface the typeutils.Converter and update to use state structure (#2217)
* update typeconverter to use state structure * deinterface the typeutils.TypeConverter -> typeutils.Converter * finish copying over old type converter code comments * fix cherry-pick merge issues, fix tests pointing to old typeutils interface type still
This commit is contained in:
@ -40,7 +40,7 @@ import (
|
||||
// from the client/REST API.
|
||||
type clientAPI struct {
|
||||
state *state.State
|
||||
tc typeutils.TypeConverter
|
||||
converter *typeutils.Converter
|
||||
surface *surface
|
||||
federate *federate
|
||||
wipeStatus wipeStatus
|
||||
@ -242,7 +242,7 @@ func (p *clientAPI) CreateFollowReq(ctx context.Context, cMsg messages.FromClien
|
||||
|
||||
if err := p.federate.Follow(
|
||||
ctx,
|
||||
p.tc.FollowRequestToFollow(ctx, followRequest),
|
||||
p.converter.FollowRequestToFollow(ctx, followRequest),
|
||||
); err != nil {
|
||||
return gtserror.Newf("error federating follow: %w", err)
|
||||
}
|
||||
@ -389,7 +389,7 @@ func (p *clientAPI) RejectFollowRequest(ctx context.Context, cMsg messages.FromC
|
||||
|
||||
if err := p.federate.RejectFollow(
|
||||
ctx,
|
||||
p.tc.FollowRequestToFollow(ctx, followReq),
|
||||
p.converter.FollowRequestToFollow(ctx, followReq),
|
||||
); err != nil {
|
||||
return gtserror.Newf("error federating reject follow: %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user