diff --git a/internal/processing/federation/getwebfinger.go b/internal/processing/federation/getwebfinger.go index 14536549d..cbc4a7ebc 100644 --- a/internal/processing/federation/getwebfinger.go +++ b/internal/processing/federation/getwebfinger.go @@ -44,6 +44,9 @@ func (p *processor) GetWebfingerAccount(ctx context.Context, requestedUsername s } accountDomain := viper.GetString(config.Keys.AccountDomain) + if accountDomain == "" { + accountDomain = viper.GetString(config.Keys.Host) + } // return the webfinger representation return &apimodel.WellKnownResponse{ diff --git a/internal/typeutils/internaltoas.go b/internal/typeutils/internaltoas.go index b3aaafff0..3adf406cf 100644 --- a/internal/typeutils/internaltoas.go +++ b/internal/typeutils/internaltoas.go @@ -623,6 +623,9 @@ func (c *converter) MentionToAS(ctx context.Context, m *gtsmodel.Mention) (vocab var domain string if m.TargetAccount.Domain == "" { accountDomain := viper.GetString(config.Keys.AccountDomain) + if accountDomain == "" { + accountDomain = viper.GetString(config.Keys.Host) + } domain = accountDomain } else { domain = m.TargetAccount.Domain