mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 19:03:09 -06:00
Fix response to /rooms/{roomId}/join #607
This commit is contained in:
parent
ad700396e6
commit
72057ac2c1
|
|
@ -108,7 +108,7 @@ func (r joinRoomReq) joinRoomByID(roomID string) util.JSONResponse {
|
||||||
// A client should only join a room by room ID when it has an invite
|
// A client should only join a room by room ID when it has an invite
|
||||||
// to the room. If the server is already in the room then we can
|
// to the room. If the server is already in the room then we can
|
||||||
// lookup the invite and process the request as a normal state event.
|
// lookup the invite and process the request as a normal state event.
|
||||||
// If the server is not in the room the we will need to look up the
|
// If the server is not in the room then we will need to look up the
|
||||||
// remote server the invite came from in order to request a join event
|
// remote server the invite came from in order to request a join event
|
||||||
// from that server.
|
// from that server.
|
||||||
queryReq := roomserverAPI.QueryInvitesForUserRequest{
|
queryReq := roomserverAPI.QueryInvitesForUserRequest{
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,14 @@ func SendMembership(
|
||||||
return httputil.LogThenError(req, err)
|
return httputil.LogThenError(req, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if membership == "join" {
|
||||||
|
return util.JSONResponse{
|
||||||
|
Code: http.StatusOK,
|
||||||
|
JSON: struct {
|
||||||
|
RoomID string `json:"room_id"`
|
||||||
|
}{roomID},
|
||||||
|
}
|
||||||
|
}
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
Code: http.StatusOK,
|
Code: http.StatusOK,
|
||||||
JSON: struct{}{},
|
JSON: struct{}{},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue