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.
|
// Send the invite event to the roomserver.
|
||||||
if err = roomserverAPI.SendInvite(
|
if perr := roomserverAPI.SendInvite(
|
||||||
req.Context(), rsAPI,
|
req.Context(), rsAPI,
|
||||||
inviteEvent.Headered(roomVersion),
|
inviteEvent.Headered(roomVersion),
|
||||||
strippedState, // invite room state
|
strippedState, // invite room state
|
||||||
cfg.Matrix.ServerName, // send as server
|
cfg.Matrix.ServerName, // send as server
|
||||||
nil, // transaction ID
|
nil, // transaction ID
|
||||||
); err != nil {
|
); perr != nil {
|
||||||
util.GetLogger(req.Context()).WithError(err).Error("SendInvite failed")
|
util.GetLogger(req.Context()).WithError(perr).Error("SendInvite failed")
|
||||||
return jsonerror.InternalServerError()
|
return perr.JSONResponse()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue