Skip to content

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

@kevinaboos

Description

@kevinaboos

In the Robrix client, I am using the RoomListService like with fairly normal filters:

    // 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions