Page MenuHomePhabricator

D12332.id41685.diff
No OneTemporary

D12332.id41685.diff

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

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)

Event Timeline