HomePhabricator
Diffusion Comm a098e3270f3d

[lib] Update `reduceUserInfos` to handle `updateUserAvatarActionTypes.success`

Description

[lib] Update reduceUserInfos to handle updateUserAvatarActionTypes.success

Summary:
This change makes sure that the userInfo entry for the "current user" is updated in lockstep with currentUserInfo when the user updates their avatar.

After this diff when a user updates their avatar

  • The viewer's current session has their currentUserInfo and userInfos updated by updateUserAvatarActionTypes.success action payload
  • The viewer's other sessions are updated via "broadcast"-ed UPDATE_USER and UPDATE_CURRENT_USER
  • Non-viewer clients are updated via "broadcast"-ed UPDATE_USER

Depends on D7700

Test Plan: Observe that on updateUserAvatarActionTypes.success both currentUserInfo and userInfos are updated as expected on viewer's current session + other viewer session + peers.

Reviewers: ashoat, ginsu

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D7701