[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:
kim
2022-09-02 10:56:33 +01:00
committed by GitHub
parent 1e1cdee06a
commit 614ab12733
19 changed files with 29 additions and 42 deletions

View File

@ -46,7 +46,7 @@ func GetParseMentionFunc(dbConn db.DB, federator federation.Federator) gtsmodel.
var mentionedAccount *gtsmodel.Account
if domain == "" || domain == config.GetHost() || domain == config.GetAccountDomain() {
localAccount, err := dbConn.GetLocalAccountByUsername(ctx, username)
localAccount, err := dbConn.GetAccountByUsernameDomain(ctx, username, "")
if err != nil {
return nil, err
}