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
Unknown Object (File)
Fri, Dec 20, 8:26 AM
Unknown Object (File)
Fri, Dec 20, 1:20 AM
Unknown Object (File)
Fri, Dec 20, 1:14 AM
Unknown Object (File)
Thu, Dec 19, 9:00 PM
Unknown Object (File)
Thu, Dec 19, 9:58 AM
Unknown Object (File)
Thu, Dec 19, 9:58 AM
Unknown Object (File)
Thu, Dec 19, 9:58 AM
Unknown Object (File)
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
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