aboutsummaryrefslogtreecommitdiff
path: root/federationapi/storage/storage.go
diff options
context:
space:
mode:
Diffstat (limited to 'federationapi/storage/storage.go')
-rw-r--r--federationapi/storage/storage.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/federationapi/storage/storage.go b/federationapi/storage/storage.go
index f246b9bc..142e281e 100644
--- a/federationapi/storage/storage.go
+++ b/federationapi/storage/storage.go
@@ -29,12 +29,12 @@ import (
)
// NewDatabase opens a new database
-func NewDatabase(base *base.BaseDendrite, dbProperties *config.DatabaseOptions, cache caching.FederationCache, serverName gomatrixserverlib.ServerName) (Database, error) {
+func NewDatabase(base *base.BaseDendrite, dbProperties *config.DatabaseOptions, cache caching.FederationCache, isLocalServerName func(gomatrixserverlib.ServerName) bool) (Database, error) {
switch {
case dbProperties.ConnectionString.IsSQLite():
- return sqlite3.NewDatabase(base, dbProperties, cache, serverName)
+ return sqlite3.NewDatabase(base, dbProperties, cache, isLocalServerName)
case dbProperties.ConnectionString.IsPostgres():
- return postgres.NewDatabase(base, dbProperties, cache, serverName)
+ return postgres.NewDatabase(base, dbProperties, cache, isLocalServerName)
default:
return nil, fmt.Errorf("unexpected database type")
}