From f9a5aa87e35140b9cc851d48c55194b7b8c37524 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Wed, 15 Apr 2026 12:07:48 +0100 Subject: [PATCH] Support the stable prefix for MSC4287 (key backup preference) (#5258) * Support the stable prefix for MSC4287 (key backup preference) * Remove incorrect doc coment on disableKeyStorage --- src/@types/event.ts | 7 +++++-- src/crypto-api/index.ts | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/@types/event.ts b/src/@types/event.ts index ec1051f0f..9ff96806a 100644 --- a/src/@types/event.ts +++ b/src/@types/event.ts @@ -416,9 +416,12 @@ export interface AccountDataEvents extends SecretStorageAccountDataEvents { [EventType.Direct]: { [userId: string]: string[] }; [EventType.IgnoredUserList]: { ignored_users: { [userId: string]: EmptyObject } }; "m.secret_storage.default_key": { key: string }; - // Flag set by the rust SDK (Element X) and also used by us to mark that the user opted out of backup - // (I don't know why it's m.org.matrix...) + + // MSC4287: Sharing key backup preference between clients - used to mark that the user opted out of key storage + "m.key_backup": { enabled: boolean }; + // MSC4287 unstable prefix (note the boolean property has the opposite sense) "m.org.matrix.custom.backup_disabled": { disabled: boolean }; + "m.identity_server": { base_url: string | null }; [key: `${typeof LOCAL_NOTIFICATION_SETTINGS_PREFIX.name}.${string}`]: LocalNotificationSettings; [key: `m.secret_storage.key.${string}`]: SecretStorageKeyDescription; diff --git a/src/crypto-api/index.ts b/src/crypto-api/index.ts index 5ff18e6c1..145e7f1df 100644 --- a/src/crypto-api/index.ts +++ b/src/crypto-api/index.ts @@ -631,7 +631,6 @@ export interface CryptoApi { * * Disables 4S, deleting the info for the default key, the default key pointer itself and any * known 4S data (cross-signing keys and the megolm key backup key). * * Deletes any dehydrated devices. - * * Sets the "m.org.matrix.custom.backup_disabled" account data flag to indicate that the user has disabled backups. */ disableKeyStorage(): Promise;