Skip to content

Commit f9a5aa8

Browse files
authored
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
1 parent ed58df0 commit f9a5aa8

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/@types/event.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,12 @@ export interface AccountDataEvents extends SecretStorageAccountDataEvents {
416416
[EventType.Direct]: { [userId: string]: string[] };
417417
[EventType.IgnoredUserList]: { ignored_users: { [userId: string]: EmptyObject } };
418418
"m.secret_storage.default_key": { key: string };
419-
// Flag set by the rust SDK (Element X) and also used by us to mark that the user opted out of backup
420-
// (I don't know why it's m.org.matrix...)
419+
420+
// MSC4287: Sharing key backup preference between clients - used to mark that the user opted out of key storage
421+
"m.key_backup": { enabled: boolean };
422+
// MSC4287 unstable prefix (note the boolean property has the opposite sense)
421423
"m.org.matrix.custom.backup_disabled": { disabled: boolean };
424+
422425
"m.identity_server": { base_url: string | null };
423426
[key: `${typeof LOCAL_NOTIFICATION_SETTINGS_PREFIX.name}.${string}`]: LocalNotificationSettings;
424427
[key: `m.secret_storage.key.${string}`]: SecretStorageKeyDescription;

src/crypto-api/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,6 @@ export interface CryptoApi {
631631
* * Disables 4S, deleting the info for the default key, the default key pointer itself and any
632632
* known 4S data (cross-signing keys and the megolm key backup key).
633633
* * Deletes any dehydrated devices.
634-
* * Sets the "m.org.matrix.custom.backup_disabled" account data flag to indicate that the user has disabled backups.
635634
*/
636635
disableKeyStorage(): Promise<void>;
637636

0 commit comments

Comments
 (0)