Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3343789
D11692.id39415.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.id39415.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?.id) {
+ 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
Sat, Nov 23, 4:04 AM (16 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2566340
Default Alt Text
D11692.id39415.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