mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53: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)
|
||||
}
|
||||
|
||||
var returnData interface{} = struct{}{}
|
||||
|
||||
// The join membership requires the room id to be sent in the response
|
||||
if membership == "join" {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusOK,
|
||||
JSON: struct {
|
||||
RoomID string `json:"room_id"`
|
||||
}{roomID},
|
||||
}
|
||||
returnData = struct {
|
||||
RoomID string `json:"room_id"`
|
||||
}{roomID}
|
||||
}
|
||||
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusOK,
|
||||
JSON: struct{}{},
|
||||
JSON: returnData,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue