Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3363280
D11692.id39241.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11692.id39241.diff
View Options
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
@@ -64,24 +64,6 @@
if (!_isEqual(newUserInfo)(state)) {
return newUserInfo;
}
- } else if (action.type === keyserverAuthActionTypes.success) {
- const { currentUserInfo: actionUserInfo } = action.payload;
- if (actionUserInfo) {
- if (!state?.id || actionUserInfo.id !== state.id) {
- console.log(
- 'keyserver auth returned a different user info than identity login',
- );
- } else {
- const newUserInfo = {
- ...state,
- avatar: actionUserInfo.avatar,
- settings: actionUserInfo.settings,
- };
- if (!_isEqual(newUserInfo)(state)) {
- return newUserInfo;
- }
- }
- }
} else if (
action.type === logInActionTypes.success ||
action.type === siweAuthActionTypes.success ||
@@ -98,9 +80,22 @@
action.payload.keyserverID === authoritativeKeyserverID() &&
relyingOnAuthoritativeKeyserver
) {
- const { sessionChange } = action.payload;
- if (!_isEqual(sessionChange.currentUserInfo)(state)) {
- return sessionChange.currentUserInfo;
+ const actionUserInfo = action.payload.sessionChange.currentUserInfo;
+ if (!actionUserInfo) {
+ return actionUserInfo;
+ } else if (!state?.id || actionUserInfo.id !== state.id) {
+ console.log(
+ 'keyserver auth returned a different user info than identity login',
+ );
+ } else {
+ const newUserInfo = {
+ ...state,
+ avatar: actionUserInfo.avatar,
+ settings: actionUserInfo.settings,
+ };
+ if (!_isEqual(newUserInfo)(state)) {
+ return newUserInfo;
+ }
}
} else if (
action.type === fullStateSyncActionType &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 1:25 AM (13 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2581882
Default Alt Text
D11692.id39241.diff (1 KB)
Attached To
Mode
D11692: [lib] Don't reduce KEYSERVER_AUTH_SUCCESS in reduceCurrentUserInfo
Attached
Detach File
Event Timeline
Log In to Comment