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..d6e590806 100644 --- a/common/keydb/keydb.go +++ b/common/keydb/keydb.go @@ -16,7 +16,6 @@ package keydb import ( "context" - "errors" "net/url" "github.com/matrix-org/dendrite/common/keydb/postgres" @@ -33,12 +32,12 @@ type Database interface { func NewDatabase(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + return postgres.NewDatabase(dataSourceName) } switch uri.Scheme { case "postgres": return postgres.NewDatabase(dataSourceName) default: - return nil, errors.New("unknown schema") + return postgres.NewDatabase(dataSourceName) } } diff --git a/federationsender/storage/storage.go b/federationsender/storage/storage.go index 8cffdbf1a..4ce151c7a 100644 --- a/federationsender/storage/storage.go +++ b/federationsender/storage/storage.go @@ -16,7 +16,6 @@ package storage import ( "context" - "errors" "net/url" "github.com/matrix-org/dendrite/common" @@ -34,12 +33,12 @@ type Database interface { func NewDatabase(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + return postgres.NewDatabase(dataSourceName) } switch uri.Scheme { case "postgres": return postgres.NewDatabase(dataSourceName) default: - return nil, errors.New("unknown schema") + return postgres.NewDatabase(dataSourceName) } } diff --git a/mediaapi/storage/storage.go b/mediaapi/storage/storage.go index 0f39c1d0c..2c7f937dd 100644 --- a/mediaapi/storage/storage.go +++ b/mediaapi/storage/storage.go @@ -16,7 +16,6 @@ package storage import ( "context" - "errors" "net/url" "github.com/matrix-org/dendrite/mediaapi/storage/postgres" @@ -36,12 +35,12 @@ type Database interface { func Open(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + return postgres.Open(dataSourceName) } switch uri.Scheme { case "postgres": return postgres.Open(dataSourceName) default: - return nil, errors.New("unknown schema") + return postgres.Open(dataSourceName) } } diff --git a/publicroomsapi/storage/storage.go b/publicroomsapi/storage/storage.go index a6a39d523..a6e18fbcb 100644 --- a/publicroomsapi/storage/storage.go +++ b/publicroomsapi/storage/storage.go @@ -16,7 +16,6 @@ package storage import ( "context" - "errors" "net/url" "github.com/matrix-org/dendrite/common" @@ -39,12 +38,12 @@ type Database interface { func NewPublicRoomsServerDatabase(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + return postgres.NewPublicRoomsServerDatabase(dataSourceName) } switch uri.Scheme { case "postgres": return postgres.NewPublicRoomsServerDatabase(dataSourceName) default: - return nil, errors.New("unknown schema") + return postgres.NewPublicRoomsServerDatabase(dataSourceName) } } diff --git a/roomserver/storage/storage.go b/roomserver/storage/storage.go index 325d96e99..df08c124b 100644 --- a/roomserver/storage/storage.go +++ b/roomserver/storage/storage.go @@ -16,7 +16,6 @@ package storage import ( "context" - "errors" "net/url" "github.com/matrix-org/dendrite/roomserver/api" @@ -61,12 +60,12 @@ type Database interface { func Open(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + return postgres.Open(dataSourceName) } switch uri.Scheme { case "postgres": return postgres.Open(dataSourceName) default: - return nil, errors.New("unknown schema") + return postgres.Open(dataSourceName) } } diff --git a/syncapi/storage/storage.go b/syncapi/storage/storage.go index e7dca4c75..5db4b3a1b 100644 --- a/syncapi/storage/storage.go +++ b/syncapi/storage/storage.go @@ -16,7 +16,6 @@ package storage import ( "context" - "errors" "net/url" "time" @@ -53,12 +52,12 @@ type Database interface { func NewSyncServerDatasource(dataSourceName string) (Database, error) { uri, err := url.Parse(dataSourceName) if err != nil { - return nil, err + return postgres.NewSyncServerDatasource(dataSourceName) } switch uri.Scheme { case "postgres": return postgres.NewSyncServerDatasource(dataSourceName) default: - return nil, errors.New("unknown schema") + return postgres.NewSyncServerDatasource(dataSourceName) } } 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