matrix-org / matrix-org/matrix-rust-sdk

RoomListService's `filter_deduplicate_versions` does not remove a tombstoned room after joining its successor

Open
#5,985 0 comments 0 reactions 1 assignee View on GitHub

@Hywan is already working on this.

Since Dec 26, 2025.

Dominant language
Rust
Stars
2.3k
Forks
500
Avg merge
1d 16h
Merged PRs (30d)
106

Description

In the [Robrix](https://github.com/project-robius/robrix) client, I am using the `RoomListService` like with fairly normal filters:
```rust
// By default, our rooms list should only show rooms that are:
// 1. not spaces (those are handled by the SpaceService),
// 2. not left (clients don't typically show rooms that the user has already left),
// 3. not outdated (don't show tombstoned rooms whose successor is already joined).
room_list_dynamic_entries_controller.set_filter(Box::new(
filters::new_filter_all(vec![
Box::new(filters::new_filter_not(Box::new(filters::new_filter_space()))),
Box::new(filters::new_filter_non_left()),
Box::new(filters::new_filter_deduplicate_versions()),
])
));
```

This only works as expected for old tombstoned rooms whose successors have already been joined _before_ the client first starts. However, if I join the successor room while the client is running (i.e., after starting the RoomListService), the old room is not removed by the RoomListService and will still be incorrectly shown, meaning that the filter(s) are being ignored.

cc discussion from the Matrix Rust SDK room: https://matrix.to/#/!2GTp0cl8dqhPideYm7pKNABc2m2VqBZz7pVX_UUlijE/$DTaxmpC6_OTrSk8-4bmBAyZNd9bw2AdkmQHsaeAbqNI?via=matrix.org&via=element.io&via=envs.net

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.