mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 11:13:12 -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{})
|
||||
if err = json.Unmarshal(e.Content(), &content); err != nil {
|
||||
util.GetLogger(ctx).WithError(err).Error("Cannot unmarshal the event content.")
|
||||
resErr := jsonerror.InternalServerError()
|
||||
return nil, &resErr
|
||||
return nil, &util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.BadJSON("Cannot unmarshal the event content."),
|
||||
}
|
||||
}
|
||||
if content["replacement_room"] == e.RoomID() {
|
||||
return nil, &util.JSONResponse{
|
||||
|
|
|
|||
Loading…
Reference in a new issue