mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02: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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user