aboutsummaryrefslogtreecommitdiff
path: root/federationsender/internal/query.go
diff options
context:
space:
mode:
Diffstat (limited to 'federationsender/internal/query.go')
-rw-r--r--federationsender/internal/query.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/federationsender/internal/query.go b/federationsender/internal/query.go
index 253400a2..8ba228d1 100644
--- a/federationsender/internal/query.go
+++ b/federationsender/internal/query.go
@@ -4,7 +4,6 @@ import (
"context"
"github.com/matrix-org/dendrite/federationsender/api"
- "github.com/matrix-org/gomatrixserverlib"
)
// QueryJoinedHostServerNamesInRoom implements api.FederationSenderInternalAPI
@@ -13,17 +12,11 @@ func (f *FederationSenderInternalAPI) QueryJoinedHostServerNamesInRoom(
request *api.QueryJoinedHostServerNamesInRoomRequest,
response *api.QueryJoinedHostServerNamesInRoomResponse,
) (err error) {
- joinedHosts, err := f.db.GetJoinedHosts(ctx, request.RoomID)
+ joinedHosts, err := f.db.GetJoinedHostsForRooms(ctx, []string{request.RoomID})
if err != nil {
return
}
-
- response.ServerNames = make([]gomatrixserverlib.ServerName, 0, len(joinedHosts))
- for _, host := range joinedHosts {
- response.ServerNames = append(response.ServerNames, host.ServerName)
- }
-
- // TODO: remove duplicates?
+ response.ServerNames = joinedHosts
return
}