Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3700636
D9246.id33120.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9246.id33120.diff
View Options
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -870,6 +870,28 @@
},
};
},
+ [57]: async state => {
+ const {
+ // eslint-disable-next-line no-unused-vars
+ connection,
+ keyserverStore: { keyserverInfos },
+ ...rest
+ } = state;
+ const newKeyserverInfos = {};
+ for (const key in keyserverInfos) {
+ newKeyserverInfos[key] = {
+ ...keyserverInfos[key],
+ connection: { ...defaultConnectionInfo },
+ };
+ }
+ return {
+ ...rest,
+ keyserverStore: {
+ ...state.keyserverStore,
+ keyserverInfos: newKeyserverInfos,
+ },
+ };
+ },
};
// After migration 31, we'll no longer want to persist `messageStore.messages`
@@ -954,11 +976,10 @@
},
(state: PersistedKeyserverStore): KeyserverStore => {
const keyserverInfos = {};
- const defaultConnection = defaultConnectionInfo;
for (const key in state.keyserverInfos) {
keyserverInfos[key] = {
...state.keyserverInfos[key],
- connection: { ...defaultConnection },
+ connection: { ...defaultConnectionInfo },
};
}
return {
@@ -985,7 +1006,7 @@
'connection',
],
debug: __DEV__,
- version: 56,
+ version: 57,
transforms: [
messageStoreMessagesBlocklistTransform,
reportStoreTransform,
diff --git a/web/redux/persist.js b/web/redux/persist.js
--- a/web/redux/persist.js
+++ b/web/redux/persist.js
@@ -183,6 +183,25 @@
},
},
}),
+ [10]: async state => {
+ const { keyserverInfos } = state.keyserverStore;
+ const newKeyserverInfos = {};
+ for (const key in keyserverInfos) {
+ newKeyserverInfos[key] = {
+ ...keyserverInfos[key],
+ connection: { ...defaultConnectionInfo },
+ updatesCurrentAsOf: 0,
+ sessionID: null,
+ };
+ }
+ return {
+ ...state,
+ keyserverStore: {
+ ...state.keyserverStore,
+ keyserverInfos: newKeyserverInfos,
+ },
+ };
+ },
};
const persistWhitelist = [
@@ -267,11 +286,10 @@
},
(state: PersistedKeyserverStore): KeyserverStore => {
const keyserverInfos = {};
- const defaultConnection = defaultConnectionInfo;
for (const key in state.keyserverInfos) {
keyserverInfos[key] = {
...state.keyserverInfos[key],
- connection: { ...defaultConnection },
+ connection: { ...defaultConnectionInfo },
updatesCurrentAsOf: 0,
sessionID: null,
};
@@ -295,7 +313,7 @@
{ debug: isDev },
migrateStorageToSQLite,
): any),
- version: 9,
+ version: 10,
transforms: [keyserverStoreTransform],
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 8, 4:58 PM (3 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2820536
Default Alt Text
D9246.id33120.diff (2 KB)
Attached To
Mode
D9246: [native][web] Fix keyserver store tranform error
Attached
Detach File
Event Timeline
Log In to Comment