From 7bfcc5f5050f7010cc683b27f754b1b25dfb103e Mon Sep 17 00:00:00 2001 From: tsmethurst Date: Thu, 2 Jun 2022 17:08:15 +0200 Subject: [PATCH] skip long search if local account --- internal/processing/search.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/processing/search.go b/internal/processing/search.go index f6ae8d433..d4ff94a21 100644 --- a/internal/processing/search.go +++ b/internal/processing/search.go @@ -182,9 +182,9 @@ func (p *processor) searchAccountByMention(ctx context.Context, authed *oauth.Au var err error // if it's a local account we can skip a whole bunch of stuff - if domain == config.GetHost() { + if domain == config.GetHost() || domain == config.GetAccountDomain() || domain == "" { maybeAcct, err = p.db.GetLocalAccountByUsername(ctx, username) - if err != nil { + if err != nil && err != db.ErrNoEntries { return nil, fmt.Errorf("searchAccountByMention: error getting local account by username: %s", err) } return maybeAcct, nil