mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-02-11 02:27:07 +01:00
skip long search if local account
This commit is contained in:
parent
8ac9001df2
commit
7bfcc5f505
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue