synapse icon indicating copy to clipboard operation
synapse copied to clipboard

Sliding Sync: Add `is_tombstoned: false` filter in the defaults

Open Hywan opened this issue 1 year ago • 2 comments

Description

Sliding Sync has default filter. is_tombstoned: false should be part of them.

Context https://github.com/element-hq/element-x-ios/issues/3105

Steps to reproduce

See https://github.com/element-hq/element-x-ios/issues/3105

Homeserver

matrix.org

Synapse Version

1.113.0rc1 (b=matrix-org-hotfixes,4907b7d459)

Installation Method

I don't know

Database

I don't know.

Workers

I don't know

Platform

I don't know.

Configuration

No response

Relevant log output

See https://github.com/element-hq/element-x-ios/issues/3105.

Anything else that would be useful to know?

No response

Hywan avatar Aug 08 '24 08:08 Hywan

For reference, we've currently opted for the simple solution of including all rooms. I've asked previously about whether is_tombstoned matters with no response.

I assume you're actually after the include_old_rooms functionality vs an is_tombstoned filter which is specifically called out as something we shouldn't do in the spec. There is an important distinction between the two, include_old_rooms makes it so that when a room is upgraded, it doesn't suddenly disappear if you haven't joined the successor yet.

When include_old_rooms is implemented, the default is to not include old rooms. And if you want to include old rooms, you can request them by adding the include_old_rooms option. The only way to tell old rooms apart from other rooms is by requesting m.room.tombstone in the required_state and checking it.

{
  "lists": {
    "foo-list": {
      "ranges": [ [0,99] ],
      "required_state": [],
      "timeline_limit": 10,
      "include_old_rooms": {
        "timeline_limit": 1,
        "required_state": [ ["m.room.tombstone", ""], ["m.room.create", ""] ],
      }
    }
  }
}

But you can mimic this same functionality today by requesting "required_state": [ ["m.room.tombstone", ""] ] and doing the same checks yourself on the client.

This is currently prioritized under a "nice to have" in the project board.

MadLittleMods avatar Aug 08 '24 22:08 MadLittleMods

I've fixed my description… we need is_tombstoned: false, not true. The problem we have is that some users see old rooms that are tombstoned. Since the is_tombstoned filter has been removed, we can no longer control this.

In https://github.com/element-hq/element-x-ios/issues/3105, the user sees tombstoned rooms. We may filter them out on the client side, but it makes no sense to receive them at first.

Hywan avatar Aug 12 '24 11:08 Hywan

Tombstone issues have been solved. I don't think Synapse should do anything more.

Hywan avatar Aug 13 '25 08:08 Hywan

For reference, how was it resolved?

MadLittleMods avatar Aug 13 '25 18:08 MadLittleMods

We filter tombstoned rooms client-side (see new_filter_deduplicate_versions). It's a bit more flexible for us.

Hywan avatar Aug 14 '25 07:08 Hywan