Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3396474
D11895.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D11895.diff
View Options
diff --git a/keyserver/src/responders/user-responders.js b/keyserver/src/responders/user-responders.js
--- a/keyserver/src/responders/user-responders.js
+++ b/keyserver/src/responders/user-responders.js
@@ -43,7 +43,11 @@
IdentityKeysBlob,
SignedIdentityKeysBlob,
} from 'lib/types/crypto-types.js';
-import type { DeviceType } from 'lib/types/device-types';
+import type {
+ DeviceType,
+ DeviceTokenUpdateRequest,
+ PlatformDetails,
+} from 'lib/types/device-types';
import {
type CalendarQuery,
rawEntryInfoValidator,
@@ -295,7 +299,9 @@
type ProcessSuccessfulLoginParams = {
+viewer: Viewer,
- +input: any,
+ +deviceTokenUpdateRequest?: ?DeviceTokenUpdateRequest,
+ +platformDetails: PlatformDetails,
+ +watchedIDs: $ReadOnlyArray<string>,
+userID: string,
+calendarQuery: ?CalendarQuery,
+socialProof?: ?SIWESocialProof,
@@ -310,7 +316,9 @@
): Promise<ServerLogInResponse> {
const {
viewer,
- input,
+ deviceTokenUpdateRequest,
+ platformDetails,
+ watchedIDs,
userID,
calendarQuery,
socialProof,
@@ -320,10 +328,9 @@
cookieHasBeenSet,
} = params;
- const request: LogInRequest = input;
const newServerTime = Date.now();
- const deviceToken = request.deviceTokenUpdateRequest
- ? request.deviceTokenUpdateRequest.deviceToken
+ const deviceToken = deviceTokenUpdateRequest
+ ? deviceTokenUpdateRequest.deviceToken
: viewer.deviceToken;
const setNewCookiePromise = (async () => {
if (cookieHasBeenSet) {
@@ -331,7 +338,7 @@
}
const [userViewerData] = await Promise.all([
createNewUserCookie(userID, {
- platformDetails: request.platformDetails,
+ platformDetails: platformDetails,
deviceToken,
socialProof,
signedIdentityKeysBlob,
@@ -395,7 +402,7 @@
})();
const threadCursors: { [string]: null } = {};
- for (const watchedThreadID of request.watchedIDs) {
+ for (const watchedThreadID of watchedIDs) {
threadCursors[watchedThreadID] = null;
}
const messageSelectionCriteria = { threadCursors, joinedThreads: true };
@@ -544,7 +551,9 @@
return await processSuccessfulLogin({
viewer,
- input: request,
+ platformDetails: request.platformDetails,
+ deviceTokenUpdateRequest: request.deviceTokenUpdateRequest,
+ watchedIDs: request.watchedIDs,
userID: id,
calendarQuery,
signedIdentityKeysBlob,
@@ -687,7 +696,9 @@
// 10. Complete login with call to `processSuccessfulLogin(...)`.
return await processSuccessfulLogin({
viewer,
- input: request,
+ platformDetails: request.platformDetails,
+ deviceTokenUpdateRequest: request.deviceTokenUpdateRequest,
+ watchedIDs: request.watchedIDs,
userID,
calendarQuery,
socialProof,
@@ -809,7 +820,9 @@
// 5. Complete login with call to `processSuccessfulLogin(...)`.
return await processSuccessfulLogin({
viewer,
- input: request,
+ platformDetails: request.platformDetails,
+ deviceTokenUpdateRequest: request.deviceTokenUpdateRequest,
+ watchedIDs: request.watchedIDs,
userID,
calendarQuery,
signedIdentityKeysBlob,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 2, 12:38 PM (18 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2607610
Default Alt Text
D11895.diff (3 KB)
Attached To
Mode
D11895: [keyserver] Update types to remove any
Attached
Detach File
Event Timeline
Log In to Comment