From aebd5fe4eb80dfd12e3a79f636081482f3ec8492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 14 Mar 2023 12:10:34 +0100 Subject: [PATCH] sdk: Fix timeline highlight test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update Ruma to fix the server default push rules. Signed-off-by: Kévin Commaille --- Cargo.lock | 14 +++++++------- Cargo.toml | 4 ++-- .../tests/integration/room/timeline/mod.rs | 12 +++++++++--- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 804c8855f..42a8953df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4292,7 +4292,7 @@ dependencies = [ [[package]] name = "ruma" version = "0.8.2" -source = "git+https://github.com/ruma/ruma?rev=a399a4017a9f0b249ce848a652f2e4fe65435eaf#a399a4017a9f0b249ce848a652f2e4fe65435eaf" +source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5" dependencies = [ "assign", "js_int", @@ -4307,7 +4307,7 @@ dependencies = [ [[package]] name = "ruma-appservice-api" version = "0.8.1" -source = "git+https://github.com/ruma/ruma?rev=a399a4017a9f0b249ce848a652f2e4fe65435eaf#a399a4017a9f0b249ce848a652f2e4fe65435eaf" +source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5" dependencies = [ "js_int", "ruma-common", @@ -4318,7 +4318,7 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.16.2" -source = "git+https://github.com/ruma/ruma?rev=a399a4017a9f0b249ce848a652f2e4fe65435eaf#a399a4017a9f0b249ce848a652f2e4fe65435eaf" +source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5" dependencies = [ "assign", "bytes", @@ -4335,7 +4335,7 @@ dependencies = [ [[package]] name = "ruma-common" version = "0.11.3" -source = "git+https://github.com/ruma/ruma?rev=a399a4017a9f0b249ce848a652f2e4fe65435eaf#a399a4017a9f0b249ce848a652f2e4fe65435eaf" +source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5" dependencies = [ "base64 0.21.0", "bytes", @@ -4368,7 +4368,7 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.7.1" -source = "git+https://github.com/ruma/ruma?rev=a399a4017a9f0b249ce848a652f2e4fe65435eaf#a399a4017a9f0b249ce848a652f2e4fe65435eaf" +source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5" dependencies = [ "js_int", "ruma-common", @@ -4379,7 +4379,7 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" version = "0.9.1" -source = "git+https://github.com/ruma/ruma?rev=a399a4017a9f0b249ce848a652f2e4fe65435eaf#a399a4017a9f0b249ce848a652f2e4fe65435eaf" +source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5" dependencies = [ "js_int", "thiserror", @@ -4388,7 +4388,7 @@ dependencies = [ [[package]] name = "ruma-macros" version = "0.11.3" -source = "git+https://github.com/ruma/ruma?rev=a399a4017a9f0b249ce848a652f2e4fe65435eaf#a399a4017a9f0b249ce848a652f2e4fe65435eaf" +source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5" dependencies = [ "once_cell", "proc-macro-crate", diff --git a/Cargo.toml b/Cargo.toml index d7fe5b27e..f64995365 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,8 +31,8 @@ eyeball = "0.4.0" eyeball-im = "0.1.0" futures-util = { version = "0.3.26", default-features = false, features = ["alloc"] } http = "0.2.6" -ruma = { git = "https://github.com/ruma/ruma", rev = "a399a4017a9f0b249ce848a652f2e4fe65435eaf", features = ["client-api-c"] } -ruma-common = { git = "https://github.com/ruma/ruma", rev = "a399a4017a9f0b249ce848a652f2e4fe65435eaf" } +ruma = { git = "https://github.com/ruma/ruma", rev = "8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5", features = ["client-api-c"] } +ruma-common = { git = "https://github.com/ruma/ruma", rev = "8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5" } once_cell = "1.16.0" serde = "1.0.151" serde_html_form = "0.2.0" diff --git a/crates/matrix-sdk/tests/integration/room/timeline/mod.rs b/crates/matrix-sdk/tests/integration/room/timeline/mod.rs index 9eb4e76db..cd520710a 100644 --- a/crates/matrix-sdk/tests/integration/room/timeline/mod.rs +++ b/crates/matrix-sdk/tests/integration/room/timeline/mod.rs @@ -17,7 +17,7 @@ use matrix_sdk::{ use matrix_sdk_common::executor::spawn; use matrix_sdk_test::{ async_test, test_json, EventBuilder, JoinedRoomBuilder, RoomAccountDataTestEvent, - TimelineTestEvent, + StateTestEvent, TimelineTestEvent, }; use ruma::{ event_id, @@ -741,7 +741,13 @@ async fn sync_highlighted() { let sync_settings = SyncSettings::new().timeout(Duration::from_millis(3000)); let mut ev_builder = EventBuilder::new(); - ev_builder.add_joined_room(JoinedRoomBuilder::new(room_id)); + ev_builder + // We need the member event and power levels locally so the push rules processor works. + .add_joined_room( + JoinedRoomBuilder::new(room_id) + .add_state_event(StateTestEvent::Member) + .add_state_event(StateTestEvent::PowerLevels), + ); mock_sync(&server, ev_builder.build_json_sync_response(), None).await; let _response = client.sync_once(sync_settings.clone()).await.unwrap(); @@ -804,5 +810,5 @@ async fn sync_highlighted() { ); let remote_event = second.as_event().unwrap().as_remote().unwrap(); // `m.room.tombstone` should be highlighted by default. - assert!(!remote_event.is_highlighted()); + assert!(remote_event.is_highlighted()); }