gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 85b4f96263cd63b21416283dc31763d2fd9ed30d
parent 1b36e858406ff6b15217229d1abaaabdbeec24e8
Author: tobi <31960611+tsmethurst@users.noreply.github.com>
Date:   Sun,  6 Feb 2022 14:07:38 +0100

if accountDomain isn't set, use Host value instead (#380)


Diffstat:
Minternal/processing/federation/getwebfinger.go | 3+++
Minternal/typeutils/internaltoas.go | 3+++
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git 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 @@ -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