summaryrefslogtreecommitdiff
path: root/internal/federation/federatingdb/owns.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/federation/federatingdb/owns.go')
-rw-r--r--internal/federation/federatingdb/owns.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/federation/federatingdb/owns.go b/internal/federation/federatingdb/owns.go
index 8846c52bb..2603c9aa2 100644
--- a/internal/federation/federatingdb/owns.go
+++ b/internal/federation/federatingdb/owns.go
@@ -24,6 +24,8 @@ import (
"net/url"
"github.com/sirupsen/logrus"
+ "github.com/spf13/viper"
+ "github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/util"
@@ -42,8 +44,9 @@ func (f *federatingDB) Owns(ctx context.Context, id *url.URL) (bool, error) {
l.Debug("entering Owns")
// if the id host isn't this instance host, we don't own this IRI
- if id.Host != f.config.Host {
- l.Tracef("we DO NOT own activity because the host is %s not %s", id.Host, f.config.Host)
+ host := viper.GetString(config.Keys.Host)
+ if id.Host != host {
+ l.Tracef("we DO NOT own activity because the host is %s not %s", id.Host, host)
return false, nil
}