mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 01:13:10 -06:00
Various fixes
This commit is contained in:
parent
ebea9244d9
commit
90ea505dbe
|
|
@ -100,13 +100,6 @@ func Setup(
|
||||||
return writers.SendEvent(req, device, vars["roomID"], vars["eventType"], vars["txnID"], &emptyString, cfg, queryAPI, producer)
|
return writers.SendEvent(req, device, vars["roomID"], vars["eventType"], vars["txnID"], &emptyString, cfg, queryAPI, producer)
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
r0mux.Handle("/rooms/{roomID}/state/{eventType}/",
|
|
||||||
common.MakeAuthAPI("send_message", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
|
||||||
vars := mux.Vars(req)
|
|
||||||
emptyString := ""
|
|
||||||
return writers.SendEvent(req, device, vars["roomID"], vars["eventType"], vars["txnID"], &emptyString, cfg, queryAPI, producer)
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
r0mux.Handle("/rooms/{roomID}/state/{eventType}/{stateKey}",
|
r0mux.Handle("/rooms/{roomID}/state/{eventType}/{stateKey}",
|
||||||
common.MakeAuthAPI("send_message", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
common.MakeAuthAPI("send_message", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
||||||
vars := mux.Vars(req)
|
vars := mux.Vars(req)
|
||||||
|
|
@ -266,20 +259,6 @@ func Setup(
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
r0mux.Handle("/publicRooms",
|
|
||||||
common.MakeAPI("public_rooms", func(req *http.Request) util.JSONResponse {
|
|
||||||
// TODO: Return a list of public rooms
|
|
||||||
return util.JSONResponse{
|
|
||||||
Code: 200,
|
|
||||||
JSON: struct {
|
|
||||||
Chunk []struct{} `json:"chunk"`
|
|
||||||
Start string `json:"start"`
|
|
||||||
End string `json:"end"`
|
|
||||||
}{[]struct{}{}, "", ""},
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
|
|
||||||
unstableMux.Handle("/thirdparty/protocols",
|
unstableMux.Handle("/thirdparty/protocols",
|
||||||
common.MakeAPI("thirdparty_protocols", func(req *http.Request) util.JSONResponse {
|
common.MakeAPI("thirdparty_protocols", func(req *http.Request) util.JSONResponse {
|
||||||
// TODO: Return the third party protcols
|
// TODO: Return the third party protcols
|
||||||
|
|
|
||||||
|
|
@ -300,7 +300,7 @@ func (m *monolith) setupConsumers() {
|
||||||
}
|
}
|
||||||
|
|
||||||
publicRoomsAPIConsumer := publicroomsapi_consumers.NewOutputRoomEvent(
|
publicRoomsAPIConsumer := publicroomsapi_consumers.NewOutputRoomEvent(
|
||||||
m.cfg, m.kafkaConsumer, m.publicRoomsAPIDB,
|
m.cfg, m.kafkaConsumer(), m.publicRoomsAPIDB,
|
||||||
)
|
)
|
||||||
if err = publicRoomsAPIConsumer.Start(); err != nil {
|
if err = publicRoomsAPIConsumer.Start(); err != nil {
|
||||||
log.Panicf("startup: failed to start room server consumer: %s", err)
|
log.Panicf("startup: failed to start room server consumer: %s", err)
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ CREATE TABLE IF NOT EXISTS publicroomsapi_public_rooms(
|
||||||
-- Aliases of the room (empty array if none)
|
-- Aliases of the room (empty array if none)
|
||||||
aliases TEXT[] NOT NULL DEFAULT '{}'::TEXT[],
|
aliases TEXT[] NOT NULL DEFAULT '{}'::TEXT[],
|
||||||
-- Canonical alias of the room (empty string if none)
|
-- Canonical alias of the room (empty string if none)
|
||||||
canonical_alias TEXT,
|
canonical_alias TEXT NOT NULL DEFAULT '',
|
||||||
-- Name of the room (empty string if none)
|
-- Name of the room (empty string if none)
|
||||||
name TEXT NOT NULL DEFAULT '',
|
name TEXT NOT NULL DEFAULT '',
|
||||||
-- Topic of the room (empty string if none)
|
-- Topic of the room (empty string if none)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue