Page MenuHomePhabricator

[lib] add action to set users device lists in `AuxUserStore`
ClosedPublic

Authored by kamil on Apr 30 2024, 6:52 AM.
Tags
None
Referenced Files
F3231620: D11841.id39886.diff
Tue, Nov 12, 11:51 AM
F3226758: D11841.id.diff
Mon, Nov 11, 7:03 PM
F3225955: D11841.id39693.diff
Mon, Nov 11, 3:03 PM
Unknown Object (File)
Mon, Nov 11, 5:40 AM
Unknown Object (File)
Sun, Nov 10, 11:41 AM
Unknown Object (File)
Fri, Nov 8, 7:18 PM
Unknown Object (File)
Fri, Nov 8, 6:18 PM
Unknown Object (File)
Thu, Nov 7, 1:10 PM
Subscribers

Details

Summary

ENG-7394.

Adding action to set device lists of multiple users.

Depends on D11840

Test Plan

Tests

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.May 6 2024, 4:25 AM
lib/actions/aux-user-actions.js
7 ↗(On Diff #39693)

Should this be read as "set users' device lists"? I wonder if SET_PEER_DEVICE_LISTS would be more clear

tomek added inline comments.
lib/reducers/aux-user-reducer.js
92–94 ↗(On Diff #39693)

Why do we have to handle fid in a special way?

94 ↗(On Diff #39693)

I think it might be slightly more readable to have a property inside a payload where we have an object with device lists.

This revision is now accepted and ready to land.May 7 2024, 2:43 AM
  • add property inside payload
  • SET_USERS_DEVICE_LISTS -> SET_PEER_DEVICE_LISTS
lib/actions/aux-user-actions.js
7 ↗(On Diff #39693)

Should this be read as "set users' device lists"?

yes, that was my intention

I wonder if SET_PEER_DEVICE_LISTS would be more clear

agree with that

lib/reducers/aux-user-reducer.js
92–94 ↗(On Diff #39693)

Why do we have to handle fid in a special way?

According to type definition fid is nullable but the field itself should be defined. That being said when adding a peer list to userID that wasn't previously in AuxUserStore we need to do it this way