diff --git a/crates/matrix-sdk/src/encryption/recovery/types.rs b/crates/matrix-sdk/src/encryption/recovery/types.rs index 042a5e9632b..5612a4b61ed 100644 --- a/crates/matrix-sdk/src/encryption/recovery/types.rs +++ b/crates/matrix-sdk/src/encryption/recovery/types.rs @@ -116,12 +116,3 @@ pub(super) struct SecretStorageDisabledContent {} pub(super) struct KeyBackupContent { pub enabled: bool, } - -/// Unstable prefix form of [MSC4287]. -/// -/// [MSC4287]: https://github.com/matrix-org/matrix-spec-proposals/pull/4287 -#[derive(Clone, Debug, Default, Deserialize, Serialize, EventContent)] -#[ruma_event(type = "m.org.matrix.custom.backup_disabled", kind = GlobalAccountData)] -pub(super) struct BackupDisabledContent { - pub disabled: bool, -} diff --git a/crates/matrix-sdk/tests/integration/encryption/recovery.rs b/crates/matrix-sdk/tests/integration/encryption/recovery.rs index 3745779d203..edafe4ec20b 100644 --- a/crates/matrix-sdk/tests/integration/encryption/recovery.rs +++ b/crates/matrix-sdk/tests/integration/encryption/recovery.rs @@ -248,26 +248,6 @@ async fn enable( let backup_disabled_content = Arc::new(Mutex::new(None)); - let _quard = Mock::given(method("PUT")) - .and(path(format!( - "_matrix/client/r0/user/{user_id}/account_data/m.org.matrix.custom.backup_disabled" - ))) - .and(header("authorization", "Bearer 1234")) - .and({ - let backup_disabled_content = backup_disabled_content.clone(); - move |request: &wiremock::Request| { - let content: Value = request.body_json().expect("The body should be a JSON body"); - - *backup_disabled_content.lock().unwrap() = Some(content); - - true - } - }) - .respond_with(ResponseTemplate::new(200).set_body_json(json!({}))) - .expect(1) - .mount_as_scoped(server) - .await; - let _guard = Mock::given(method("GET")) .and(path("_matrix/client/r0/room_keys/version")) .and(header("authorization", "Bearer 1234")) @@ -533,28 +513,6 @@ async fn test_backups_enabling() { .mount(&server) .await; - Mock::given(method("PUT")) - .and(path(format!( - "_matrix/client/r0/user/{user_id}/account_data/m.org.matrix.custom.backup_disabled" - ))) - .and(header("authorization", "Bearer 1234")) - .and(|request: &wiremock::Request| { - #[derive(Deserialize)] - struct Disabled { - disabled: bool, - } - - let content: Disabled = request.body_json().expect("The body should be a JSON body"); - - assert!(!content.disabled, "The backup support should be marked as enabled."); - - true - }) - .respond_with(ResponseTemplate::new(200).set_body_json(json!({}))) - .expect(1) - .mount(&server) - .await; - Mock::given(method("POST")) .and(path("_matrix/client/unstable/room_keys/version")) .and(header("authorization", "Bearer 1234")) @@ -672,28 +630,6 @@ async fn test_recovery_disabling() { .mount(&server) .await; - Mock::given(method("PUT")) - .and(path(format!( - "_matrix/client/r0/user/{user_id}/account_data/m.org.matrix.custom.backup_disabled" - ))) - .and(header("authorization", "Bearer 1234")) - .and(|request: &wiremock::Request| { - #[derive(Deserialize)] - struct Disabled { - disabled: bool, - } - - let content: Disabled = request.body_json().expect("The body should be a JSON body"); - - assert!(content.disabled, "The backup support should be marked as disabled."); - - true - }) - .respond_with(ResponseTemplate::new(200).set_body_json(json!({}))) - .expect(1) - .mount(&server) - .await; - Mock::given(method("GET")) .and(path(format!( "_matrix/client/r0/user/{user_id}/account_data/m.secret_storage.default_key" @@ -976,17 +912,6 @@ async fn test_reset_identity() { .mount(&server) .await; - Mock::given(method("PUT")) - .and(path(format!( - "_matrix/client/r0/user/{user_id}/account_data/m.org.matrix.custom.backup_disabled" - ))) - .and(header("authorization", "Bearer 1234")) - .respond_with(ResponseTemplate::new(200).set_body_json(json!({}))) - .expect(1) - .named("m.org.matrix.custom.backup_disabled PUT") - .mount(&server) - .await; - Mock::given(method("GET")) .and(path(format!("_matrix/client/r0/user/{user_id}/account_data/m.key_backup"))) .and(header("authorization", "Bearer 1234"))