mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:12:25 -05:00
[chore] Update versions, fix lint errors (#1860)
This commit is contained in:
parent
1d4137fb88
commit
21c1552daa
12 changed files with 66 additions and 57 deletions
|
|
@ -70,11 +70,7 @@ func (f *federatingDB) Reject(ctx context.Context, reject vocab.ActivityStreamsR
|
|||
return errors.New("Reject: follow object account and inbox account were not the same")
|
||||
}
|
||||
|
||||
if err := f.state.DB.RejectFollowRequest(ctx, followReq.AccountID, followReq.TargetAccountID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return f.state.DB.RejectFollowRequest(ctx, followReq.AccountID, followReq.TargetAccountID)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -90,20 +86,19 @@ func (f *federatingDB) Reject(ctx context.Context, reject vocab.ActivityStreamsR
|
|||
if !ok {
|
||||
return errors.New("Reject: couldn't parse follow into vocab.ActivityStreamsFollow")
|
||||
}
|
||||
|
||||
// convert the follow to something we can understand
|
||||
gtsFollow, err := f.typeConverter.ASFollowToFollow(ctx, asFollow)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Reject: error converting asfollow to gtsfollow: %s", err)
|
||||
}
|
||||
|
||||
// make sure the addressee of the original follow is the same as whatever inbox this landed in
|
||||
if gtsFollow.AccountID != receivingAccount.ID {
|
||||
return errors.New("Reject: follow object account and inbox account were not the same")
|
||||
}
|
||||
if err := f.state.DB.RejectFollowRequest(ctx, gtsFollow.AccountID, gtsFollow.TargetAccountID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return f.state.DB.RejectFollowRequest(ctx, gtsFollow.AccountID, gtsFollow.TargetAccountID)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue