diff --git a/bindings/matrix-sdk-ffi/src/notification_settings.rs b/bindings/matrix-sdk-ffi/src/notification_settings.rs index f1d1d9858..f758a2fda 100644 --- a/bindings/matrix-sdk-ffi/src/notification_settings.rs +++ b/bindings/matrix-sdk-ffi/src/notification_settings.rs @@ -308,14 +308,12 @@ impl NotificationSettings { .await { enabled - // Check unstable identifier - } else if let Ok(enabled) = notification_settings - .is_push_rule_enabled(RuleKind::Override, ".org.matrix.msc4028.encrypted_event") - .await - { - enabled } else { - false + // Check unstable identifier + notification_settings + .is_push_rule_enabled(RuleKind::Override, ".org.matrix.msc4028.encrypted_event") + .await + .unwrap_or(false) } } diff --git a/crates/matrix-sdk-indexeddb/src/state_store/mod.rs b/crates/matrix-sdk-indexeddb/src/state_store/mod.rs index cfd97aa73..85a541098 100644 --- a/crates/matrix-sdk-indexeddb/src/state_store/mod.rs +++ b/crates/matrix-sdk-indexeddb/src/state_store/mod.rs @@ -654,7 +654,7 @@ impl_state_store!({ .delete(&self.encode_key(keys::STRIPPED_USER_IDS, key))?; user_ids.put_key_val_owned( - &self.encode_key(keys::USER_IDS, key), + self.encode_key(keys::USER_IDS, key), &self.serialize_event(&RoomMember::from(&event))?, )?; @@ -662,7 +662,7 @@ impl_state_store!({ profile_changes.and_then(|p| p.get(event.state_key())) { profiles.put_key_val_owned( - &self.encode_key(keys::PROFILES, key), + self.encode_key(keys::PROFILES, key), &self.serialize_event(&profile)?, )?; } @@ -721,7 +721,7 @@ impl_state_store!({ let key = (room, state_key); user_ids.put_key_val_owned( - &self.encode_key(keys::STRIPPED_USER_IDS, key), + self.encode_key(keys::STRIPPED_USER_IDS, key), &self.serialize_event(&RoomMember::from(&event))?, )?; } diff --git a/crates/matrix-sdk-ui/tests/integration/timeline/echo.rs b/crates/matrix-sdk-ui/tests/integration/timeline/echo.rs index 23cbf5dd7..8c0f0dbbd 100644 --- a/crates/matrix-sdk-ui/tests/integration/timeline/echo.rs +++ b/crates/matrix-sdk-ui/tests/integration/timeline/echo.rs @@ -63,7 +63,7 @@ async fn test_echo() { .and(header("authorization", "Bearer 1234")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ "event_id": "$wWgymRfo7ri1uQx0NXO40vLJ" })), + .set_body_json(json!({ "event_id": "$wWgymRfo7ri1uQx0NXO40vLJ" })), ) .mount(&server) .await; @@ -188,7 +188,7 @@ async fn test_retry_failed() { .and(header("authorization", "Bearer 1234")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ "event_id": "$wWgymRfo7ri1uQx0NXO40vLJ" })), + .set_body_json(json!({ "event_id": "$wWgymRfo7ri1uQx0NXO40vLJ" })), ) .mount(&server) .await; @@ -229,7 +229,7 @@ async fn test_dedup_by_event_id_late() { .and(header("authorization", "Bearer 1234")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ "event_id": event_id })) + .set_body_json(json!({ "event_id": event_id })) // Not great to use a timer for this, but it's what wiremock gives us right now. // Ideally we'd wait on a channel to produce a value or sth. like that. .set_delay(Duration::from_millis(100)), diff --git a/crates/matrix-sdk-ui/tests/integration/timeline/queue.rs b/crates/matrix-sdk-ui/tests/integration/timeline/queue.rs index 9367a6876..21ddce84e 100644 --- a/crates/matrix-sdk-ui/tests/integration/timeline/queue.rs +++ b/crates/matrix-sdk-ui/tests/integration/timeline/queue.rs @@ -60,7 +60,7 @@ async fn test_message_order() { .and(body_string_contains("First!")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ "event_id": "$PyHxV5mYzjetBUT3qZq7V95GOzxb02EP" })) + .set_body_json(json!({ "event_id": "$PyHxV5mYzjetBUT3qZq7V95GOzxb02EP" })) .set_delay(Duration::from_millis(200)), ) .mount(&server) @@ -73,7 +73,7 @@ async fn test_message_order() { .and(body_string_contains("Second.")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ "event_id": "$5E2kLK/Sg342bgBU9ceEIEPYpbFaqJpZ" })) + .set_body_json(json!({ "event_id": "$5E2kLK/Sg342bgBU9ceEIEPYpbFaqJpZ" })) .set_delay(Duration::from_millis(100)), ) .mount(&server) @@ -172,7 +172,7 @@ async fn test_retry_order() { .and(body_string_contains("First!")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ "event_id": "$PyHxV5mYzjetBUT3qZq7V95GOzxb02EP" })) + .set_body_json(json!({ "event_id": "$PyHxV5mYzjetBUT3qZq7V95GOzxb02EP" })) .set_delay(Duration::from_millis(100)), ) .mount(&server) @@ -185,7 +185,7 @@ async fn test_retry_order() { .and(body_string_contains("Second.")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ "event_id": "$5E2kLK/Sg342bgBU9ceEIEPYpbFaqJpZ" })) + .set_body_json(json!({ "event_id": "$5E2kLK/Sg342bgBU9ceEIEPYpbFaqJpZ" })) .set_delay(Duration::from_millis(200)), ) .mount(&server) @@ -252,7 +252,7 @@ async fn test_clear_with_echoes() { .and(path_regex(r"^/_matrix/client/r0/rooms/.*/send/.*")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ "event_id": "$PyHxV5mYzjetBUT3qZq7V95GOzxb02EP" })) + .set_body_json(json!({ "event_id": "$PyHxV5mYzjetBUT3qZq7V95GOzxb02EP" })) .set_delay(Duration::from_secs(3600)), ) .mount(&server) @@ -320,7 +320,7 @@ async fn test_no_duplicate_day_divider() { .and(body_string_contains("First!")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ + .set_body_json(json!({ "event_id": "$PyHxV5mYzjetBUT3qZq7V95GOzxb02EP", })) .set_delay(Duration::from_millis(200)), @@ -335,7 +335,7 @@ async fn test_no_duplicate_day_divider() { .and(body_string_contains("Second.")) .respond_with( ResponseTemplate::new(200) - .set_body_json(&json!({ + .set_body_json(json!({ "event_id": "$5E2kLK/Sg342bgBU9ceEIEPYpbFaqJpZ", })) .set_delay(Duration::from_millis(100)),