From 0bb72064b52223d34ad4437a3c9216bd7bee5df4 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 31 Mar 2025 17:06:52 +0200 Subject: [PATCH] refactor(event cache): don't have find_event_with_relations return replies It's unclear whether it's useful, especially in the case where it would return an entire reply chain. It's not possible to filter in replies only, using the function either, which is a sign that replies shouldn't be indexed, IMO. In any case, that's something we can add back in the future, if we want to. --- crates/matrix-sdk/src/event_cache/room/mod.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/crates/matrix-sdk/src/event_cache/room/mod.rs b/crates/matrix-sdk/src/event_cache/room/mod.rs index 68f68dbf6..43003bcee 100644 --- a/crates/matrix-sdk/src/event_cache/room/mod.rs +++ b/crates/matrix-sdk/src/event_cache/room/mod.rs @@ -1496,22 +1496,6 @@ mod tests { .await; } - #[async_test] - async fn test_event_with_reply_relation() { - let original_id = event_id!("$original"); - let related_id = event_id!("$related"); - let room_id = room_id!("!galette:saucisse.bzh"); - let f = EventFactory::new().room(room_id).sender(user_id!("@ben:saucisse.bzh")); - - assert_relations( - room_id, - f.text_msg("Original event").event_id(original_id).into(), - f.text_msg("A reply").reply_to(original_id).event_id(related_id).into(), - f, - ) - .await; - } - #[async_test] async fn test_event_with_thread_reply_relation() { let original_id = event_id!("$original");