From 614ab12733b991dbea9d1f7fa311a98072558727 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Fri, 2 Sep 2022 10:56:33 +0100 Subject: [performance] use GetAccountByUsernameDomain() for local account lookups to rely on cache (#793) Signed-off-by: kim Signed-off-by: kim --- internal/federation/federatingprotocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/federation/federatingprotocol.go') diff --git a/internal/federation/federatingprotocol.go b/internal/federation/federatingprotocol.go index 8242ca4b1..24dd471c2 100644 --- a/internal/federation/federatingprotocol.go +++ b/internal/federation/federatingprotocol.go @@ -157,7 +157,7 @@ func (f *federator) AuthenticatePostInbox(ctx context.Context, w http.ResponseWr return nil, false, errors.New("username was empty") } - receivingAccount, err := f.db.GetLocalAccountByUsername(ctx, username) + receivingAccount, err := f.db.GetAccountByUsernameDomain(ctx, username, "") if err != nil { return nil, false, fmt.Errorf("could not fetch receiving account with username %s: %s", username, err) } -- cgit v1.2.3