mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-20 21:33:19 -06:00
Send back JSONResponse according to the PerformError
This commit is contained in:
parent
da441b60fc
commit
fa239080e6
|
|
@ -403,15 +403,15 @@ func createRoom(
|
|||
}
|
||||
}
|
||||
// Send the invite event to the roomserver.
|
||||
if err = roomserverAPI.SendInvite(
|
||||
if perr := roomserverAPI.SendInvite(
|
||||
req.Context(), rsAPI,
|
||||
inviteEvent.Headered(roomVersion),
|
||||
strippedState, // invite room state
|
||||
cfg.Matrix.ServerName, // send as server
|
||||
nil, // transaction ID
|
||||
); err != nil {
|
||||
util.GetLogger(req.Context()).WithError(err).Error("SendInvite failed")
|
||||
return jsonerror.InternalServerError()
|
||||
); perr != nil {
|
||||
util.GetLogger(req.Context()).WithError(perr).Error("SendInvite failed")
|
||||
return perr.JSONResponse()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue