diff --git a/build.sh b/build.sh index 9a8050f3c..cb1091114 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,3 @@ #!/bin/sh -GOBIN=$PWD/`dirname $0`/bin go install -v ./cmd/... +GOBIN=$PWD/`dirname $0`/bin go install -v $PWD/`dirname $0`/cmd/... diff --git a/common/keydb/keydb.go b/common/keydb/keydb.go index b9fa884e2..04692e98c 100644 --- a/common/keydb/keydb.go +++ b/common/keydb/keydb.go @@ -33,7 +33,9 @@ type Database interface { func NewDatabase(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + // if the scheme doesn't match, fall back to postgres in case the config has + // postgres key=value connection strings + return postgres.NewDatabase(dataSourceName) } switch uri.Scheme { case "postgres": diff --git a/federationsender/storage/storage.go b/federationsender/storage/storage.go index 8cffdbf1a..9f2805cf7 100644 --- a/federationsender/storage/storage.go +++ b/federationsender/storage/storage.go @@ -34,12 +34,14 @@ type Database interface { func NewDatabase(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + // if the scheme doesn't match, fall back to postgres in case the config has + // postgres key=value connection strings + return postgres.NewDatabase(dataSourceName) } switch uri.Scheme { case "postgres": return postgres.NewDatabase(dataSourceName) default: - return nil, errors.New("unknown schema") + return errors.New("unknown schema") } } diff --git a/mediaapi/storage/storage.go b/mediaapi/storage/storage.go index 0f39c1d0c..ca9f69f8f 100644 --- a/mediaapi/storage/storage.go +++ b/mediaapi/storage/storage.go @@ -36,7 +36,9 @@ type Database interface { func Open(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + // if the scheme doesn't match, fall back to postgres in case the config has + // postgres key=value connection strings + return postgres.Open(dataSourceName) } switch uri.Scheme { case "postgres": diff --git a/publicroomsapi/storage/storage.go b/publicroomsapi/storage/storage.go index a6a39d523..d611686ba 100644 --- a/publicroomsapi/storage/storage.go +++ b/publicroomsapi/storage/storage.go @@ -39,7 +39,9 @@ type Database interface { func NewPublicRoomsServerDatabase(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + // if the scheme doesn't match, fall back to postgres in case the config has + // postgres key=value connection strings + return postgres.NewPublicRoomsServerDatabase(dataSourceName) } switch uri.Scheme { case "postgres": diff --git a/roomserver/storage/storage.go b/roomserver/storage/storage.go index c3bd2d0ae..f2634067f 100644 --- a/roomserver/storage/storage.go +++ b/roomserver/storage/storage.go @@ -62,7 +62,9 @@ type Database interface { func Open(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + // if the scheme doesn't match, fall back to postgres in case the config has + // postgres key=value connection strings + return postgres.Open(dataSourceName) } switch uri.Scheme { case "postgres": diff --git a/syncapi/storage/storage.go b/syncapi/storage/storage.go index eedb42f0e..4d896531a 100644 --- a/syncapi/storage/storage.go +++ b/syncapi/storage/storage.go @@ -52,7 +52,9 @@ type Database interface { func NewSyncServerDatasource(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + // if the scheme doesn't match, fall back to postgres in case the config has + // postgres key=value connection strings + return postgres.NewSyncServerDatasource(dataSourceName) } switch uri.Scheme { case "postgres": diff --git a/testfile b/testfile index 8a4e9de12..a869aeff1 100644 --- a/testfile +++ b/testfile @@ -197,3 +197,9 @@ Regular users cannot create room aliases within the AS namespace Deleting a non-existent alias should return a 404 Users can't delete other's aliases Outbound federation can query room alias directory +After deactivating account, can't log in with an email +Remote room alias queries can handle Unicode +Newly joined room is included in an incremental sync after invite +Outbound federation can query v1 /send_join +Inbound /v1/make_join rejects remote attempts to join local users to rooms +Inbound federation rejects invites which are not signed by the sender