Page MenuHomePhabricator

[lib] Don't remove avatar when fetching username
ClosedPublic

Authored by inka on Jun 5 2024, 6:09 AM.
Tags
None
Referenced Files
F3500350: D12318.id40981.diff
Fri, Dec 20, 1:20 AM
F3500323: D12318.id41038.diff
Fri, Dec 20, 1:14 AM
F3498182: D12318.diff
Thu, Dec 19, 9:00 PM
F3495786: D12318.id41680.diff
Thu, Dec 19, 9:58 AM
F3495785: D12318.id41038.diff
Thu, Dec 19, 9:58 AM
F3495784: D12318.id40981.diff
Thu, Dec 19, 9:58 AM
F3495768: D12318.id.diff
Thu, Dec 19, 9:58 AM
F3495759: D12318.diff
Thu, Dec 19, 9:58 AM
Subscribers

Details

Summary

When findUserIdentitiesActionTypes.success is dispatched, an entry for this id may already exist in the store - we may have gotten the user infos from auth keyserver already. We don't want to forget other values of this user info. Namely - avatar and relationshipStatus.

Test Plan

Dispatched findUserIdentitiesActionTypes.success without avatar for an entry that existed in the store and had an avatar. Checked that the updated entry still had the avatar.

Diff Detail

Repository
rCOMM Comm
Branch
inka/userStore
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

inka requested review of this revision.Jun 5 2024, 6:40 AM
tomek added inline comments.
lib/reducers/user-reducer.js
258–269

This can be simplified by iterating over action.payload.userInfos instead of creating an object from it

This revision is now accepted and ready to land.Jun 5 2024, 6:59 AM