mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 19:03:09 -06:00
Explain and condense end of SendMembership
This commit is contained in:
parent
0872c1ba4b
commit
313dd397f7
|
|
@ -99,18 +99,18 @@ func SendMembership(
|
||||||
return httputil.LogThenError(req, err)
|
return httputil.LogThenError(req, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var returnData interface{} = struct{}{}
|
||||||
|
|
||||||
|
// The join membership requires the room id to be sent in the response
|
||||||
if membership == "join" {
|
if membership == "join" {
|
||||||
return util.JSONResponse{
|
returnData = struct {
|
||||||
Code: http.StatusOK,
|
|
||||||
JSON: struct {
|
|
||||||
RoomID string `json:"room_id"`
|
RoomID string `json:"room_id"`
|
||||||
}{roomID},
|
}{roomID}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
Code: http.StatusOK,
|
Code: http.StatusOK,
|
||||||
JSON: struct{}{},
|
JSON: returnData,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue