mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 03:32:24 -06:00
[performance] use GetAccountByUsernameDomain() for local account lookups to rely on cache (#793)
Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
1e1cdee06a
commit
614ab12733
19 changed files with 29 additions and 42 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue