diff --git a/lib/backup/persist-shared-migrations.js b/lib/backup/persist-shared-migrations.js --- a/lib/backup/persist-shared-migrations.js +++ b/lib/backup/persist-shared-migrations.js @@ -49,6 +49,17 @@ syncedMetadataStoreOperations, }; }: SharedMigrationFunction), + [97]: (async () => { + // We're performing an empty migration here to ensure that the clients + // won't receive an unsupported message through the backup. + // COMPOUND_REACTION message is created only locally, but it's also + // added to a backup. It is possible that an older client will try to + // restore a backup including these messages. We want to avoid this + // because the message isn't supported on the older version. This + // migration ensures that the backup can't be restored on clients that + // don't support this message type. + return {}; + }: SharedMigrationFunction), }; export { sharedMigrations }; diff --git a/native/redux/persist-constants.js b/native/redux/persist-constants.js --- a/native/redux/persist-constants.js +++ b/native/redux/persist-constants.js @@ -5,6 +5,6 @@ // NOTE: renaming this constant requires updating // `native/native_rust_library/build.rs` to correctly // scrap Redux state version from this file. -const storeVersion = 96; +const storeVersion = 97; export { rootKey, storeVersion }; diff --git a/native/redux/persist.js b/native/redux/persist.js --- a/native/redux/persist.js +++ b/native/redux/persist.js @@ -1716,6 +1716,13 @@ ops, }; }: MigrationFunction), + [97]: (async (state: AppState) => { + const ops = await sharedMigrations[97](databaseIdentifier.MAIN); + return { + state, + ops, + }; + }: MigrationFunction), }); const persistConfig = { diff --git a/web/redux/persist-constants.js b/web/redux/persist-constants.js --- a/web/redux/persist-constants.js +++ b/web/redux/persist-constants.js @@ -3,6 +3,6 @@ const rootKey = 'root'; const rootKeyPrefix = 'persist:'; const completeRootKey = `${rootKeyPrefix}${rootKey}`; -const storeVersion = 96; +const storeVersion = 97; export { rootKey, rootKeyPrefix, completeRootKey, storeVersion }; diff --git a/web/redux/persist.js b/web/redux/persist.js --- a/web/redux/persist.js +++ b/web/redux/persist.js @@ -925,6 +925,13 @@ ops, }; }: MigrationFunction), + [97]: (async (state: AppState) => { + const ops = await sharedMigrations[97](databaseIdentifier.MAIN); + return { + state, + ops, + }; + }: MigrationFunction), }; const persistConfig: PersistConfig = {