mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
Fix test POST /rooms/:room_id/join can join a room
This commit is contained in:
parent
a0dec456c1
commit
5a8df3be88
|
|
@ -99,6 +99,14 @@ func Setup(
|
|||
r0mux.Handle("/rooms/{roomID}/{membership:(?:join|kick|ban|unban|leave|invite)}",
|
||||
common.MakeAuthAPI("membership", authData, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
||||
vars := mux.Vars(req)
|
||||
|
||||
// If this is a join, reuse the JoinRoomByIDOrAlias method
|
||||
if vars["membership"] == "join" {
|
||||
return JoinRoomByIDOrAlias(
|
||||
req, device, vars["roomID"], cfg, federation, producer, queryAPI, aliasAPI, keyRing, accountDB,
|
||||
)
|
||||
}
|
||||
|
||||
return SendMembership(req, accountDB, device, vars["roomID"], vars["membership"], cfg, queryAPI, asAPI, producer)
|
||||
}),
|
||||
).Methods(http.MethodPost, http.MethodOptions)
|
||||
|
|
|
|||
1
testfile
1
testfile
|
|
@ -42,6 +42,7 @@ POST /join/:room_alias can join a room
|
|||
POST /join/:room_id can join a room
|
||||
POST /join/:room_id can join a room with custom content
|
||||
POST /join/:room_alias can join a room with custom content
|
||||
POST /rooms/:room_id/join can join a room
|
||||
POST /rooms/:room_id/leave can leave a room
|
||||
POST /rooms/:room_id/invite can send an invite
|
||||
POST /rooms/:room_id/ban can ban a user
|
||||
|
|
|
|||
Loading…
Reference in a new issue