Exclude our own server name in GetJoinedHostsForRooms (#2110)

* Exclude our own servername

* Make excluding self behaviour optional
This commit is contained in:
Neil Alexander 2022-01-25 17:00:39 +00:00 committed by GitHub
parent 49a618dfe2
commit 8a1bc70524
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 34 additions and 15 deletions

View file

@ -78,7 +78,7 @@ func NewInternalAPI(
) api.FederationInternalAPI {
cfg := &base.Cfg.FederationAPI
federationDB, err := storage.NewDatabase(&cfg.Database, base.Caches)
federationDB, err := storage.NewDatabase(&cfg.Database, base.Caches, base.Cfg.Global.ServerName)
if err != nil {
logrus.WithError(err).Panic("failed to connect to federation sender db")
}