element-hq / element-hq/synapse
Valid `m.room.tombstone` state event results in "Content has no replacement_room key" error
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
When trying to send an `m.room.tombstone` custom state event through either `devtools` or Swagger, I only receive an `Content has no replacement_room key` error despite the `replacement_room` being populated in the `content`.
devtools
```json
{
"content": {
"replacement_room": "!dwCfBTJakfZKJONWKw:matrix.org",
"body": "This room has been replaced"
},
"room_id": "!GGpVnIHTefZpWGatgK:hackingfor.eu",
"sender": "@thomcat:thomcat.rocks"
}
```
Swagger
```json
{
"content": {
"body": "This room has been replaced",
"replacement_room": "!dwCfBTJakfZKJONWKw:matrix.org"
},
"room_id": "!GGpVnIHTefZpWGatgK:hackingfor.eu",
"sender": "@thomcat:thomcat.rocks",
"state_key": "",
"type": "m.room.tombstone"
}
```
### Steps to reproduce
- `devtools` -> Explore room state -> Send custom state event
- https://playground.matrix.org/#put-/_matrix/client/v3/rooms/-roomId-/state/-eventType-/-stateKey- -> Paste JSON into "Example" -> Click "Try" button
### Homeserver
thomcat.rocks
### Synapse Version
1.121.1
### Installation Method
Docker (matrixdotorg/synapse)
### Database
Single Postgres, never ported from SQLite, never restored previously
### Workers
Single process
### Platform
Ubuntu 22.04, running `synapse` in docker container
### Configuration
_No response_
### Relevant log output
```shell
synapse.http.server - 130 - INFO - PUT-173 - SynapseError: 400 - Content has no replacement_room key
```
### Anything else that would be useful to know?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.