From 118d51a2cd496c56afb67209e53ad949e07293fa Mon Sep 17 00:00:00 2001 From: tsmethurst Date: Fri, 15 Oct 2021 11:29:35 +0200 Subject: [PATCH] tidy up federation call --- internal/processing/fromfederator.go | 11 +---------- 1 file changed, 1 insertion(+), 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 }