Page MenuHomePhabricator

D11692.id39241.diff
No OneTemporary

D11692.id39241.diff

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

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)

Event Timeline