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
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
Unknown Object (File)
Mon, Dec 9, 12:31 PM
Unknown Object (File)
Thu, Dec 5, 5:38 AM
Unknown Object (File)
Mon, Dec 2, 3:37 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #40981)

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