Page MenuHomePhabricator

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

Authored by inka on Wed, Jun 5, 6:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 25, 5:59 AM
Unknown Object (File)
Fri, Jun 21, 5:36 AM
Unknown Object (File)
Wed, Jun 19, 8:11 AM
Unknown Object (File)
Sun, Jun 16, 3:41 AM
Unknown Object (File)
Fri, Jun 14, 11:02 AM
Unknown Object (File)
Wed, Jun 12, 1:58 PM
Unknown Object (File)
Wed, Jun 12, 11:27 AM
Unknown Object (File)
Wed, Jun 12, 6:48 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Wed, Jun 5, 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.Wed, Jun 5, 6:59 AM