mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Prevent roomserver asking AS API for alias info
This commit is contained in:
parent
76cceac638
commit
185662a3c6
|
|
@ -20,7 +20,6 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
appserviceAPI "github.com/matrix-org/dendrite/appservice/api"
|
|
||||||
"github.com/matrix-org/dendrite/roomserver/api"
|
"github.com/matrix-org/dendrite/roomserver/api"
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
)
|
)
|
||||||
|
|
@ -90,6 +89,11 @@ func (r *RoomserverInternalAPI) GetRoomIDForAlias(
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO: Why is this here? It creates an unnecessary dependency
|
||||||
|
from the roomserver to the appservice component, which should be
|
||||||
|
altogether optional.
|
||||||
|
|
||||||
if roomID == "" {
|
if roomID == "" {
|
||||||
// No room found locally, try our application services by making a call to
|
// No room found locally, try our application services by making a call to
|
||||||
// the appservice component
|
// the appservice component
|
||||||
|
|
@ -106,6 +110,7 @@ func (r *RoomserverInternalAPI) GetRoomIDForAlias(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
response.RoomID = roomID
|
response.RoomID = roomID
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/Shopify/sarama"
|
"github.com/Shopify/sarama"
|
||||||
appserviceAPI "github.com/matrix-org/dendrite/appservice/api"
|
|
||||||
"github.com/matrix-org/dendrite/common"
|
"github.com/matrix-org/dendrite/common"
|
||||||
"github.com/matrix-org/dendrite/common/caching"
|
"github.com/matrix-org/dendrite/common/caching"
|
||||||
"github.com/matrix-org/dendrite/common/config"
|
"github.com/matrix-org/dendrite/common/config"
|
||||||
|
|
@ -29,7 +28,6 @@ type RoomserverInternalAPI struct {
|
||||||
OutputRoomEventTopic string // Kafka topic for new output room events
|
OutputRoomEventTopic string // Kafka topic for new output room events
|
||||||
mutex sync.Mutex // Protects calls to processRoomEvent
|
mutex sync.Mutex // Protects calls to processRoomEvent
|
||||||
fsAPI fsAPI.FederationSenderInternalAPI
|
fsAPI fsAPI.FederationSenderInternalAPI
|
||||||
AppserviceAPI appserviceAPI.AppServiceQueryAPI
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetupHTTP adds the RoomserverInternalAPI handlers to the http.ServeMux.
|
// SetupHTTP adds the RoomserverInternalAPI handlers to the http.ServeMux.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue