Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3495716
D12332.id41685.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
D12332.id41685.diff
View Options
diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js
--- a/lib/actions/user-actions.js
+++ b/lib/actions/user-actions.js
@@ -609,8 +609,6 @@
keyserverAuthCallSingleKeyserverEndpointOptions,
);
- const userInfosArrays = [];
-
let threadInfos: RawThreadInfos = {};
const calendarResult: WritableCalendarResult = {
calendarQuery: keyserverAuthInfo.calendarQuery,
@@ -648,22 +646,29 @@
...updatesCurrentAsOf,
[keyserverID]: responses[keyserverID].serverTime,
};
- userInfosArrays.push(responses[keyserverID].userInfos);
- userInfosArrays.push(responses[keyserverID].cookieChange.userInfos);
}
- const userInfos = mergeUserInfos(...userInfosArrays);
+ const authKeyserverID = authoritativeKeyserverID();
+ let userInfos: $ReadOnlyArray<UserInfo> = [];
+ if (responses[authKeyserverID]) {
+ const userInfosArrays = [
+ responses[authKeyserverID].userInfos,
+ responses[authKeyserverID].cookieChange.userInfos,
+ ];
+
+ userInfos = mergeUserInfos(...userInfosArrays);
+ }
return {
threadInfos,
- currentUserInfo: responses[authoritativeKeyserverID()]?.currentUserInfo,
+ currentUserInfo: responses[authKeyserverID]?.currentUserInfo,
calendarResult,
messagesResult,
userInfos,
updatesCurrentAsOf,
authActionSource: keyserverAuthInfo.authActionSource,
notAcknowledgedPolicies:
- responses[authoritativeKeyserverID()]?.notAcknowledgedPolicies,
+ responses[authKeyserverID]?.notAcknowledgedPolicies,
preRequestUserInfo,
};
};
diff --git a/lib/reducers/user-reducer.js b/lib/reducers/user-reducer.js
--- a/lib/reducers/user-reducer.js
+++ b/lib/reducers/user-reducer.js
@@ -442,7 +442,10 @@
[],
userStoreOps,
];
- } else if (action.type === keyserverAuthActionTypes.success) {
+ } else if (
+ action.type === keyserverAuthActionTypes.success &&
+ relyingOnAuthoritativeKeyserver
+ ) {
const newUserInfos = _keyBy(userInfo => userInfo.id)(
action.payload.userInfos,
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 9:44 AM (11 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2681353
Default Alt Text
D12332.id41685.diff (2 KB)
Attached To
Mode
D12332: [lib] Stop processing user infos from secondary keyservers on keyserverAuthActionTypes
Attached
Detach File
Event Timeline
Log In to Comment