mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-15 05:32:25 +03:00
Implement public rooms APIs (#185)
* Move events contents to common * Basic database structure * Complete database update * Support visibility update and retrieval * Add HTTP methods for visibility update and retrieval * Add the database for the new component * Add a listener for the new component * Fix attribute update statements * Create public rooms component * Fix failing test * Add roomserver consumer * Fix a bug in aliases creation * Add a check on type * Implement public rooms directory * Use auth API for visibility update * Support filtering * Add component to monolith * Various fixes * Fix computation of next public rooms batch * Retrieve state events from the roomserver query API + avoid dupes on join * Split update of string or boolean attribute in two separate functions * Use event type to detect duplicate joins * Improve the joined members counter computation * Use event.RoomID()
This commit is contained in:
parent
fc86821a90
commit
b15ce900ab
22 changed files with 1098 additions and 36 deletions
|
@ -265,20 +265,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",
|
||||
common.MakeAPI("thirdparty_protocols", func(req *http.Request) util.JSONResponse {
|
||||
// TODO: Return the third party protcols
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue