Skip to content

m.room.tombstone events are not honored in spaces #32669

@promasu

Description

@promasu

Steps to reproduce

  1. Create a space
  2. Create a new space with the predecessor attribute set:
{
  "creation_content": { 
    "predecessor": { 
      "room_id": "!OLD_ROOM_ID",
      "event_id": "Last event"
    },
    "type": "m.space"
  }
}
  1. Validate new space has attribute set by looking at the advanced tab of the space settings.
Image
  1. Send a m.room.tombstone event to the old space
curl
-X PUT
-H 'Authorization: Bearer ACCESS_TOKEN'
-H 'Content-Type: application/json'
-d '{"replacement_room":"!NEW_ROOM_ID","body":"Space upgrade"}'
'https://example.com/_matrix/client/v3/rooms/!OLD_ROOM_ID/state/m.room.tombstone'
  1. Check if m.room.tombstone is set properly
curl
-H 'Authorization: Bearer ACCESS_TOKEN'
'https://example.com/_matrix/client/v3/rooms/!OLD_ROOM_ID/messages?limit=1&dir=b'
{
  "chunk": [
    {
      "type": "m.room.tombstone",
      "sender": "@USERNAME",
      "content": {
        "replacement_room": "!NEW_ROOM_ID",
        "body": "Space upgrade"
      },
      "room_id": "!OLD_ROOM_ID",
      "state_key": "",
      "origin_server_ts": 1772210302287,
      "unsigned": {
        "membership": "join",
        "age": 48940
      },
      "event_id": "$EVENT_ID",
      "user_id": "@USERNAME",
      "age": 48940
    }
  ],
  "start": "t9-6942_0_0_0_0_0_0_0_0_0_0_0",
  "end": "t9-6941_0_0_0_0_0_0_0_0_0_0_0"
}
  1. Check in Element Web if something happened

Outcome

What did you expect?

Matrix spec specifies

Clients which understand m.room.tombstone events and the predecessor field on m.room.create events should communicate to the user that the room was upgraded.

When the event is received I expect Element to show a message in the space that it has been replaced and display a link that

What happened instead?

Nothing

Operating system

Arch Linux

Browser information

Firefox for Arch Linux 147.0.2

URL for webapp

No response

Application version

Element version: 1.12.11 Crypto version: Rust SDK 0.16.0 (82e97d4), Vodozemac 0.9.0

Homeserver

Synapse 1.148.0+ess.1

Will you send logs?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions