Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32606753
D10770.1767442870.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D10770.1767442870.diff
View Options
diff --git a/lib/reducers/keyserver-reducer.js b/lib/reducers/keyserver-reducer.js
--- a/lib/reducers/keyserver-reducer.js
+++ b/lib/reducers/keyserver-reducer.js
@@ -24,6 +24,7 @@
keyserverStoreOpsHandlers,
type ReplaceKeyserverOperation,
type RemoveKeyserversOperation,
+ type KeyserverStoreOperation,
} from '../ops/keyserver-store-ops.js';
import { queueActivityUpdatesActionType } from '../types/activity-types.js';
import type { KeyserverInfos, KeyserverStore } from '../types/keyserver-types';
@@ -391,22 +392,28 @@
) {
// We want to remove all keyservers but Ashoat's keyserver
const oldConnection = state.keyserverInfos[ashoatKeyserverID].connection;
-
- const keyserverInfos = {
- [ashoatKeyserverID]: {
- ...state.keyserverInfos[ashoatKeyserverID],
- connection: {
- ...oldConnection,
- connectionIssue: null,
- queuedActivityUpdates: [],
+ const operations: KeyserverStoreOperation[] = [
+ { type: 'remove_all_keyservers' },
+ ];
+ operations.push({
+ type: 'replace_keyserver',
+ payload: {
+ id: ashoatKeyserverID,
+ keyserverInfo: {
+ ...state.keyserverInfos[ashoatKeyserverID],
+ connection: {
+ ...oldConnection,
+ connectionIssue: null,
+ queuedActivityUpdates: [],
+ },
+ cookie: null,
},
- cookie: null,
},
- };
+ });
return {
...state,
- keyserverInfos,
+ keyserverInfos: processStoreOps(state.keyserverInfos, operations),
};
} else if (action.type === setLateResponseActionType) {
const { messageID, isLate, keyserverID } = action.payload;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 3, 12:21 PM (11 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5888490
Default Alt Text
D10770.1767442870.diff (1 KB)
Attached To
Mode
D10770: [lib] refactor logout in `keyserver-reducer` to ops
Attached
Detach File
Event Timeline
Log In to Comment