Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3734305
D8813.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
D8813.diff
View Options
diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js
--- a/keyserver/src/responders/website-responders.js
+++ b/keyserver/src/responders/website-responders.js
@@ -511,6 +511,7 @@
cookie: undefined,
sessionID,
updatesCurrentAsOf,
+ urlPrefix,
},
},
};
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
@@ -14,6 +14,7 @@
} from '../types/socket-types.js';
import { processUpdatesActionType } from '../types/update-types.js';
import { setNewSessionActionType } from '../utils/action-utils.js';
+import { setURLPrefix } from '../utils/url-utils.js';
import { ashoatKeyserverID } from '../utils/validation-utils.js';
export default function reduceKeyserverStore(
@@ -75,6 +76,17 @@
},
},
};
+ } else if (action.type === setURLPrefix) {
+ return {
+ ...state,
+ keyserverInfos: {
+ ...state.keyserverInfos,
+ [ashoatKeyserverID]: {
+ ...state.keyserverInfos[ashoatKeyserverID],
+ urlPrefix: action.payload,
+ },
+ },
+ };
}
return state;
diff --git a/lib/types/keyserver-types.js b/lib/types/keyserver-types.js
--- a/lib/types/keyserver-types.js
+++ b/lib/types/keyserver-types.js
@@ -11,6 +11,7 @@
+cookie?: ?string,
+sessionID?: ?string,
+updatesCurrentAsOf: number, // millisecond timestamp
+ +urlPrefix: string,
};
export type KeyserverStore = {
@@ -22,6 +23,7 @@
cookie: t.maybe(t.String),
sessionID: t.maybe(t.String),
updatesCurrentAsOf: t.Number,
+ urlPrefix: t.String,
});
export const keyserverStoreValidator: TInterface<KeyserverStore> =
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -123,7 +123,10 @@
lastCommunicatedPlatformDetails: {},
keyserverStore: {
keyserverInfos: {
- [ashoatKeyserverID]: { updatesCurrentAsOf: 0 },
+ [ashoatKeyserverID]: {
+ updatesCurrentAsOf: 0,
+ urlPrefix: defaultURLPrefix,
+ },
},
},
}: AppState);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 3:34 AM (14 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2844340
Default Alt Text
D8813.diff (2 KB)
Attached To
Mode
D8813: [keyserver][lib][native] Add urlPrefix to keyserverStore
Attached
Detach File
Event Timeline
Log In to Comment