diff --git a/keyserver/src/fetchers/thread-fetchers.js b/keyserver/src/fetchers/thread-fetchers.js --- a/keyserver/src/fetchers/thread-fetchers.js +++ b/keyserver/src/fetchers/thread-fetchers.js @@ -11,8 +11,8 @@ getCommunity, } from 'lib/shared/thread-utils.js'; import { - FUTURE_CODE_VERSION, hasMinCodeVersion, + NEXT_CODE_VERSION, } from 'lib/shared/version-utils.js'; import type { AvatarDBContent, ClientAvatar } from 'lib/types/avatar-types.js'; import type { RawMessageInfo, MessageInfo } from 'lib/types/message-types.js'; @@ -334,8 +334,8 @@ const messageDeletionUnsupported = !hasMinCodeVersion( viewer.platformDetails, { - native: FUTURE_CODE_VERSION, - web: FUTURE_CODE_VERSION, + native: NEXT_CODE_VERSION, + web: NEXT_CODE_VERSION, }, ); diff --git a/lib/shared/messages/delete-message-spec.js b/lib/shared/messages/delete-message-spec.js --- a/lib/shared/messages/delete-message-spec.js +++ b/lib/shared/messages/delete-message-spec.js @@ -18,7 +18,7 @@ import type { RawUnsupportedMessageInfo } from '../../types/messages/unsupported.js'; import type { RelativeUserInfo } from '../../types/user-types.js'; import { ET } from '../../utils/entity-text.js'; -import { FUTURE_CODE_VERSION, hasMinCodeVersion } from '../version-utils.js'; +import { hasMinCodeVersion, NEXT_CODE_VERSION } from '../version-utils.js'; export const deleteMessageSpec: MessageSpec< DeleteMessageData, @@ -105,8 +105,8 @@ ): RawDeleteMessageInfo | RawUnsupportedMessageInfo { if ( hasMinCodeVersion(platformDetails, { - native: FUTURE_CODE_VERSION, - web: FUTURE_CODE_VERSION, + native: NEXT_CODE_VERSION, + web: NEXT_CODE_VERSION, }) ) { return rawMessageInfo; 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 @@ -1,6 +1,6 @@ // @flow const rootKey = 'root'; -const storeVersion = 89; +const storeVersion = 90; 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 @@ -1583,6 +1583,12 @@ dmOperationTypes.SEND_DELETE_MESSAGE, handleReduxMigrationFailure, ): MigrationFunction), + [90]: (async (state: AppState) => + unshimClientDB( + state, + [messageTypes.DELETE_MESSAGE], + handleReduxMigrationFailure, + ): MigrationFunction), }); // NOTE: renaming this object, and especially the `version` property 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 = 89; +const storeVersion = 90; 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 @@ -71,7 +71,7 @@ } from './handle-redux-migration-failure.js'; import { rootKey, rootKeyPrefix, storeVersion } from './persist-constants.js'; import type { AppState } from './redux-setup.js'; -import { legacyUnshimClientDB } from './unshim-utils.js'; +import { legacyUnshimClientDB, unshimClientDB } from './unshim-utils.js'; import { authoritativeKeyserverID } from '../authoritative-keyserver.js'; import { getCommSharedWorker } from '../shared-worker/shared-worker-provider.js'; import { getOlmWasmPath } from '../shared-worker/utils/constants.js'; @@ -819,6 +819,11 @@ dmOperationTypes.SEND_DELETE_MESSAGE, handleReduxMigrationFailure, ): MigrationFunction), + [90]: (async (state: AppState) => + unshimClientDB(state, [messageTypes.DELETE_MESSAGE]): MigrationFunction< + WebNavInfo, + AppState, + >), }; const persistConfig: PersistConfig = {