summaryrefslogtreecommitdiff
path: root/internal/processing/fromfederator.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-10-16 13:27:43 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-16 13:27:43 +0200
commit15621f5324b4613d83efb94711c97eeaa83da2b3 (patch)
treeb86c837dec89f5c74a7127f1bcd8e224bf6dd8a6 /internal/processing/fromfederator.go
parentUser password change (#280) (diff)
downloadgotosocial-15621f5324b4613d83efb94711c97eeaa83da2b3.tar.xz
Follow request improvements (#282)
* tiny doc update * add rejectfollowrequest to db * add follow request reject to processor * add reject handler * tidy up follow request api * tidy up federation call * regenerate swagger docs * api endpoint tests * processor test * add reject federatingdb handler * start writing reject tests * test reject follow request * go fmt * increase sleep for slow test setups * more relaxed time.sleep
Diffstat (limited to 'internal/processing/fromfederator.go')
-rw-r--r--internal/processing/fromfederator.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/internal/processing/fromfederator.go b/internal/processing/fromfederator.go
index 8a36fb9b7..243c0f3d7 100644
--- a/internal/processing/fromfederator.go
+++ b/internal/processing/fromfederator.go
@@ -161,22 +161,13 @@ func (p *processor) processCreateFollowRequestFromFederator(ctx context.Context,
return p.notifyFollowRequest(ctx, followRequest)
}
- if followRequest.Account == nil {
- a, err := p.db.GetAccountByID(ctx, followRequest.AccountID)
- if err != nil {
- return err
- }
- followRequest.Account = a
- }
- originAccount := followRequest.Account
-
// if the target account isn't locked, we should already accept the follow and notify about the new follower instead
follow, err := p.db.AcceptFollowRequest(ctx, followRequest.AccountID, followRequest.TargetAccountID)
if err != nil {
return err
}
- if err := p.federateAcceptFollowRequest(ctx, follow, originAccount, targetAccount); err != nil {
+ if err := p.federateAcceptFollowRequest(ctx, follow); err != nil {
return err
}