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)
Mon, Nov 11, 5:21 AM
Unknown Object (File)
Mon, Nov 11, 2:15 AM
Unknown Object (File)
Mon, Nov 11, 1:19 AM
Unknown Object (File)
Mon, Nov 11, 12:27 AM
Unknown Object (File)
Sun, Nov 10, 5:35 PM
Unknown Object (File)
Oct 11 2024, 5:46 AM
Unknown Object (File)
Oct 11 2024, 5:46 AM
Unknown Object (File)
Oct 11 2024, 5:46 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