diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2021-06-29 09:37:28 +0100 |
---|---|---|
committer | Neil Alexander <neilalexander@users.noreply.github.com> | 2021-06-29 09:37:28 +0100 |
commit | f645646ca90eb361c5673dc65bc82673de474559 (patch) | |
tree | 66f333eb2f4523b3cc233a6d01da3fdf8d29ae90 /federationapi | |
parent | 4417f24678988b823a1dbf6ee118b08eef95c645 (diff) |
Restore the getServers RS query (needs optimisation)
Diffstat (limited to 'federationapi')
-rw-r--r-- | federationapi/routing/send.go | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index 40d4b033..d9d28fdc 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -486,16 +486,14 @@ func (t *txnReq) getServers(ctx context.Context, roomID string) []gomatrixserver return t.servers } t.servers = []gomatrixserverlib.ServerName{t.Origin} - /* - serverReq := &api.QueryServerJoinedToRoomRequest{ - RoomID: roomID, - } - serverRes := &api.QueryServerJoinedToRoomResponse{} - if err := t.rsAPI.QueryServerJoinedToRoom(ctx, serverReq, serverRes); err == nil { - t.servers = append(t.servers, serverRes.ServerNames...) - util.GetLogger(ctx).Infof("Found %d server(s) to query for missing events in %q", len(t.servers), roomID) - } - */ + serverReq := &api.QueryServerJoinedToRoomRequest{ + RoomID: roomID, + } + serverRes := &api.QueryServerJoinedToRoomResponse{} + if err := t.rsAPI.QueryServerJoinedToRoom(ctx, serverReq, serverRes); err == nil { + t.servers = append(t.servers, serverRes.ServerNames...) + util.GetLogger(ctx).Infof("Found %d server(s) to query for missing events in %q", len(t.servers), roomID) + } return t.servers } |