diff options
author | 2021-08-25 15:34:33 +0200 | |
---|---|---|
committer | 2021-08-25 15:34:33 +0200 | |
commit | 2dc9fc1626507bb54417fc4a1920b847cafb27a2 (patch) | |
tree | 4ddeac479b923db38090aac8bd9209f3646851c1 /internal/federation/federatingdb/accept.go | |
parent | Manually approves followers (#146) (diff) | |
download | gotosocial-2dc9fc1626507bb54417fc4a1920b847cafb27a2.tar.xz |
Pg to bun (#148)
* start moving to bun
* changing more stuff
* more
* and yet more
* tests passing
* seems stable now
* more big changes
* small fix
* little fixes
Diffstat (limited to 'internal/federation/federatingdb/accept.go')
-rw-r--r-- | internal/federation/federatingdb/accept.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/federation/federatingdb/accept.go b/internal/federation/federatingdb/accept.go index 91d9df86f..0b14e8a6a 100644 --- a/internal/federation/federatingdb/accept.go +++ b/internal/federation/federatingdb/accept.go @@ -86,7 +86,7 @@ func (f *federatingDB) Accept(ctx context.Context, accept vocab.ActivityStreamsA if util.IsFollowPath(acceptedObjectIRI) { // ACCEPT FOLLOW gtsFollowRequest := >smodel.FollowRequest{} - if err := f.db.GetWhere([]db.Where{{Key: "uri", Value: acceptedObjectIRI.String()}}, gtsFollowRequest); err != nil { + if err := f.db.GetWhere(ctx, []db.Where{{Key: "uri", Value: acceptedObjectIRI.String()}}, gtsFollowRequest); err != nil { return fmt.Errorf("ACCEPT: couldn't get follow request with id %s from the database: %s", acceptedObjectIRI.String(), err) } @@ -94,7 +94,7 @@ func (f *federatingDB) Accept(ctx context.Context, accept vocab.ActivityStreamsA if gtsFollowRequest.AccountID != targetAcct.ID { return errors.New("ACCEPT: follow object account and inbox account were not the same") } - follow, err := f.db.AcceptFollowRequest(gtsFollowRequest.AccountID, gtsFollowRequest.TargetAccountID) + follow, err := f.db.AcceptFollowRequest(ctx, gtsFollowRequest.AccountID, gtsFollowRequest.TargetAccountID) if err != nil { return err } @@ -123,7 +123,7 @@ func (f *federatingDB) Accept(ctx context.Context, accept vocab.ActivityStreamsA return errors.New("ACCEPT: couldn't parse follow into vocab.ActivityStreamsFollow") } // convert the follow to something we can understand - gtsFollow, err := f.typeConverter.ASFollowToFollow(asFollow) + gtsFollow, err := f.typeConverter.ASFollowToFollow(ctx, asFollow) if err != nil { return fmt.Errorf("ACCEPT: error converting asfollow to gtsfollow: %s", err) } @@ -131,7 +131,7 @@ func (f *federatingDB) Accept(ctx context.Context, accept vocab.ActivityStreamsA if gtsFollow.AccountID != targetAcct.ID { return errors.New("ACCEPT: follow object account and inbox account were not the same") } - follow, err := f.db.AcceptFollowRequest(gtsFollow.AccountID, gtsFollow.TargetAccountID) + follow, err := f.db.AcceptFollowRequest(ctx, gtsFollow.AccountID, gtsFollow.TargetAccountID) if err != nil { return err } |