summaryrefslogtreecommitdiff
path: root/internal/processing/federation/getwebfinger.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/federation/getwebfinger.go')
-rw-r--r--internal/processing/federation/getwebfinger.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/processing/federation/getwebfinger.go b/internal/processing/federation/getwebfinger.go
index aaa7687be..e16b3e139 100644
--- a/internal/processing/federation/getwebfinger.go
+++ b/internal/processing/federation/getwebfinger.go
@@ -22,7 +22,9 @@ import (
"context"
"fmt"
+ "github.com/spf13/viper"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
+ "github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
)
@@ -41,9 +43,11 @@ func (p *processor) GetWebfingerAccount(ctx context.Context, requestedUsername s
return nil, gtserror.NewErrorNotFound(fmt.Errorf("database error getting account with username %s: %s", requestedUsername, err))
}
+ accountDomain := viper.GetString(config.Keys.AccountDomain)
+
// return the webfinger representation
return &apimodel.WellKnownResponse{
- Subject: fmt.Sprintf("%s:%s@%s", webfingerAccount, requestedAccount.Username, p.config.AccountDomain),
+ Subject: fmt.Sprintf("%s:%s@%s", webfingerAccount, requestedAccount.Username, accountDomain),
Aliases: []string{
requestedAccount.URI,
requestedAccount.URL,