diff options
Diffstat (limited to 'internal/processing/search.go')
-rw-r--r-- | internal/processing/search.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/processing/search.go b/internal/processing/search.go index fbcfb02be..a7a2b3109 100644 --- a/internal/processing/search.go +++ b/internal/processing/search.go @@ -25,7 +25,9 @@ import ( "strings" "github.com/sirupsen/logrus" + "github.com/spf13/viper" apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" + "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtserror" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" @@ -164,7 +166,8 @@ func (p *processor) searchAccountByMention(ctx context.Context, authed *oauth.Au // if it's a local account we can skip a whole bunch of stuff maybeAcct := >smodel.Account{} - if domain == p.config.Host { + host := viper.GetString(config.Keys.Host) + if domain == host { maybeAcct, err = p.db.GetLocalAccountByUsername(ctx, username) if err != nil { return nil, fmt.Errorf("searchAccountByMention: error getting local account by username: %s", err) |