Use only origin server to speed things up

This commit is contained in:
Neil Alexander 2021-06-30 09:58:33 +01:00
parent 57be026e81
commit f54063a61a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -466,13 +466,14 @@ func (t *txnReq) processDeviceListUpdate(ctx context.Context, e gomatrixserverli
}
}
func (t *txnReq) getServers(ctx context.Context, roomID string) []gomatrixserverlib.ServerName {
func (t *txnReq) getServers(_ context.Context, _ string) []gomatrixserverlib.ServerName {
t.serversMutex.Lock()
defer t.serversMutex.Unlock()
if t.servers != nil {
return t.servers
}
t.servers = []gomatrixserverlib.ServerName{t.Origin}
/*
serverReq := &api.QueryServerJoinedToRoomRequest{
RoomID: roomID,
}
@ -481,6 +482,7 @@ func (t *txnReq) getServers(ctx context.Context, roomID string) []gomatrixserver
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
}