mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 16:27:28 -06: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:
parent
1b848aa1e5
commit
8f67dd583d
119 changed files with 611 additions and 742 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue