diff options
author | 2022-09-02 10:56:33 +0100 | |
---|---|---|
committer | 2022-09-02 11:56:33 +0200 | |
commit | 614ab12733b991dbea9d1f7fa311a98072558727 (patch) | |
tree | 41780382cb71413566c8c87ce1ce0184c504253b /internal/transport/controller.go | |
parent | [feature] Emojify spoiler and content in web templates (#785) (diff) | |
download | gotosocial-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/transport/controller.go')
-rw-r--r-- | internal/transport/controller.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/transport/controller.go b/internal/transport/controller.go index 255932d5d..5a72871d8 100644 --- a/internal/transport/controller.go +++ b/internal/transport/controller.go @@ -129,7 +129,7 @@ func (c *controller) NewTransportForUsername(ctx context.Context, username strin u = username } - ourAccount, err := c.db.GetLocalAccountByUsername(ctx, u) + ourAccount, err := c.db.GetAccountByUsernameDomain(ctx, u, "") if err != nil { return nil, fmt.Errorf("error getting account %s from db: %s", username, err) } @@ -138,6 +138,7 @@ func (c *controller) NewTransportForUsername(ctx context.Context, username strin if err != nil { return nil, fmt.Errorf("error creating transport for user %s: %s", username, err) } + return transport, nil } |