mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 13:22:26 +03:00
Membership viewing API when user left the room (#194)
* Implement case where user left the room * Filter by membership event * Move the logic from the storage to the query API * Fix check on state entries iteration * Remove aliases methods from query API * Use structure for response to match with the spec * Remove filtering on /members and implement /joined_members
This commit is contained in:
parent
fceb027ecc
commit
685e056ab3
6 changed files with 126 additions and 43 deletions
|
@ -302,7 +302,14 @@ 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)
|
||||
return readers.GetMemberships(req, device, vars["roomID"], false, accountDB, cfg, queryAPI)
|
||||
}),
|
||||
)
|
||||
|
||||
r0mux.Handle("/rooms/{roomID}/joined_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"], true, accountDB, cfg, queryAPI)
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue