mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-03 04:03:09 -06:00
Fix return error on m.room.tombstone handling in client API
This commit is contained in:
parent
5d62b8f2cd
commit
38ed60c8db
|
|
@ -278,8 +278,10 @@ func generateSendEvent(
|
||||||
content := make(map[string]interface{})
|
content := make(map[string]interface{})
|
||||||
if err = json.Unmarshal(e.Content(), &content); err != nil {
|
if err = json.Unmarshal(e.Content(), &content); err != nil {
|
||||||
util.GetLogger(ctx).WithError(err).Error("Cannot unmarshal the event content.")
|
util.GetLogger(ctx).WithError(err).Error("Cannot unmarshal the event content.")
|
||||||
resErr := jsonerror.InternalServerError()
|
return nil, &util.JSONResponse{
|
||||||
return nil, &resErr
|
Code: http.StatusBadRequest,
|
||||||
|
JSON: jsonerror.BadJSON("Cannot unmarshal the event content."),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if content["replacement_room"] == e.RoomID() {
|
if content["replacement_room"] == e.RoomID() {
|
||||||
return nil, &util.JSONResponse{
|
return nil, &util.JSONResponse{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue