summaryrefslogtreecommitdiff
path: root/internal/federation/dereferencing/account.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2022-09-02 10:56:33 +0100
committerLibravatar GitHub <noreply@github.com>2022-09-02 11:56:33 +0200
commit614ab12733b991dbea9d1f7fa311a98072558727 (patch)
tree41780382cb71413566c8c87ce1ce0184c504253b /internal/federation/dereferencing/account.go
parent[feature] Emojify spoiler and content in web templates (#785) (diff)
downloadgotosocial-614ab12733b991dbea9d1f7fa311a98072558727.tar.xz
[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>
Diffstat (limited to 'internal/federation/dereferencing/account.go')
-rw-r--r--internal/federation/dereferencing/account.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/federation/dereferencing/account.go b/internal/federation/dereferencing/account.go
index cbb9466ff..0fda96bf4 100644
--- a/internal/federation/dereferencing/account.go
+++ b/internal/federation/dereferencing/account.go
@@ -127,7 +127,7 @@ func (d *deref) GetRemoteAccount(ctx context.Context, params GetRemoteAccountPar
// to be a local account, so don't resolve
skipResolve = true
- if a, dbErr := d.db.GetLocalAccountByUsername(ctx, params.RemoteAccountUsername); dbErr == nil {
+ if a, dbErr := d.db.GetAccountByUsernameDomain(ctx, params.RemoteAccountUsername, ""); dbErr == nil {
foundAccount = a
} else if dbErr != db.ErrNoEntries {
err = fmt.Errorf("GetRemoteAccount: database error looking for local account with username %s: %s", params.RemoteAccountUsername, err)