mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Membership viewing API (#174)
* Basic memberships retrieval * Change the way the memberships are saved in the client API database * Retrieve single membership * Get memberships only if the user is or has been in the room * Check server name on room ID instead of user ID * Save the join membership event and updates it when necessary * Membership events retrieval + update on leave * Implement the API on the roomserver and client API server * Fix comments * Remove the functions and attributes used before the new query API * Explicitely state what we return in query * Remove tab
This commit is contained in:
parent
81179a0595
commit
5950293e79
11 changed files with 383 additions and 48 deletions
|
@ -313,6 +313,13 @@ func Setup(
|
|||
}),
|
||||
)
|
||||
|
||||
r0mux.Handle("/rooms/{roomID}/members",
|
||||
common.MakeAuthAPI("rooms_members", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
||||
vars := mux.Vars(req)
|
||||
return readers.GetMemberships(req, device, vars["roomID"], accountDB, cfg, queryAPI)
|
||||
}),
|
||||
)
|
||||
|
||||
r0mux.Handle("/rooms/{roomID}/read_markers",
|
||||
common.MakeAPI("rooms_read_markers", func(req *http.Request) util.JSONResponse {
|
||||
// TODO: return the read_markers.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue