mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-20 05:13:11 -06:00
Fix appservice and EDU server API setup, update sytest-whitelist
This commit is contained in:
parent
da20f270c6
commit
e8706983bb
|
|
@ -82,9 +82,7 @@ func SetupAppServiceAPIComponent(
|
|||
Cfg: base.Cfg,
|
||||
}
|
||||
|
||||
if base.EnableHTTPAPIs {
|
||||
appserviceQueryAPI.SetupHTTP(http.DefaultServeMux)
|
||||
}
|
||||
appserviceQueryAPI.SetupHTTP(base.InternalAPIMux)
|
||||
|
||||
consumer := consumers.NewOutputRoomEventConsumer(
|
||||
base.Cfg, base.KafkaConsumer, accountsDB, appserviceDB,
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import (
|
|||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/matrix-org/dendrite/appservice/api"
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
"github.com/matrix-org/dendrite/internal/config"
|
||||
|
|
@ -182,8 +183,8 @@ func makeHTTPClient() *http.Client {
|
|||
|
||||
// SetupHTTP adds the AppServiceQueryPAI handlers to the http.ServeMux. This
|
||||
// handles and muxes incoming api requests the to internal AppServiceQueryAPI.
|
||||
func (a *AppServiceQueryAPI) SetupHTTP(servMux *http.ServeMux) {
|
||||
servMux.Handle(
|
||||
func (a *AppServiceQueryAPI) SetupHTTP(internalAPIMux *mux.Router) {
|
||||
internalAPIMux.Handle(
|
||||
api.AppServiceRoomAliasExistsPath,
|
||||
internal.MakeInternalAPI("appserviceRoomAliasExists", func(req *http.Request) util.JSONResponse {
|
||||
var request api.RoomAliasExistsRequest
|
||||
|
|
@ -197,7 +198,7 @@ func (a *AppServiceQueryAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
return util.JSONResponse{Code: http.StatusOK, JSON: &response}
|
||||
}),
|
||||
)
|
||||
servMux.Handle(
|
||||
internalAPIMux.Handle(
|
||||
api.AppServiceUserIDExistsPath,
|
||||
internal.MakeInternalAPI("appserviceUserIDExists", func(req *http.Request) util.JSONResponse {
|
||||
var request api.UserIDExistsRequest
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
package eduserver
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/matrix-org/dendrite/eduserver/api"
|
||||
"github.com/matrix-org/dendrite/eduserver/cache"
|
||||
"github.com/matrix-org/dendrite/eduserver/input"
|
||||
|
|
@ -35,9 +33,7 @@ func SetupEDUServerComponent(
|
|||
OutputTypingEventTopic: string(base.Cfg.Kafka.Topics.OutputTypingEvent),
|
||||
}
|
||||
|
||||
if base.EnableHTTPAPIs {
|
||||
inputAPI.SetupHTTP(http.DefaultServeMux)
|
||||
}
|
||||
inputAPI.SetupHTTP(base.InternalAPIMux)
|
||||
|
||||
return inputAPI
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/Shopify/sarama"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/matrix-org/dendrite/eduserver/api"
|
||||
"github.com/matrix-org/dendrite/eduserver/cache"
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
|
|
@ -90,8 +91,8 @@ func (t *EDUServerInputAPI) sendEvent(ite *api.InputTypingEvent) error {
|
|||
}
|
||||
|
||||
// SetupHTTP adds the EDUServerInputAPI handlers to the http.ServeMux.
|
||||
func (t *EDUServerInputAPI) SetupHTTP(servMux *http.ServeMux) {
|
||||
servMux.Handle(api.EDUServerInputTypingEventPath,
|
||||
func (t *EDUServerInputAPI) SetupHTTP(internalAPIMux *mux.Router) {
|
||||
internalAPIMux.Handle(api.EDUServerInputTypingEventPath,
|
||||
internal.MakeInternalAPI("inputTypingEvents", func(req *http.Request) util.JSONResponse {
|
||||
var request api.InputTypingEventRequest
|
||||
var response api.InputTypingEventResponse
|
||||
|
|
|
|||
|
|
@ -289,3 +289,4 @@ Existing members see new members' join events
|
|||
Inbound federation can receive events
|
||||
Inbound federation can receive redacted events
|
||||
Can logout current device
|
||||
Guest users can accept invites to private rooms over federation
|
||||
|
|
|
|||
Loading…
Reference in a new issue