Only store our own aliases in publicroomsapi (#1081)

Otherwise we just store the latest aliases submitted from a server,
which is not what we want.
This commit is contained in:
Kegsay 2020-06-02 15:01:13 +01:00 committed by GitHub
parent 794c63e757
commit 02b150fd13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 44 additions and 31 deletions

View file

@ -47,8 +47,8 @@ type PublicRoomsServerDatabase struct {
}
// NewPublicRoomsServerDatabase creates a new public rooms server database.
func NewPublicRoomsServerDatabase(dataSourceName string, pubsub *pubsub.PubSub) (*PublicRoomsServerDatabase, error) {
pg, err := postgres.NewPublicRoomsServerDatabase(dataSourceName, nil)
func NewPublicRoomsServerDatabase(dataSourceName string, pubsub *pubsub.PubSub, localServerName gomatrixserverlib.ServerName) (*PublicRoomsServerDatabase, error) {
pg, err := postgres.NewPublicRoomsServerDatabase(dataSourceName, nil, localServerName)
if err != nil {
return nil, err
}