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
F3396307: D11841.id39880.diff
Sun, Dec 1, 11:40 AM
Unknown Object (File)
Fri, Nov 29, 5:25 AM
Unknown Object (File)
Thu, Nov 28, 5:00 PM
Unknown Object (File)
Sun, Nov 24, 2:53 PM
Unknown Object (File)
Sat, Nov 23, 5:44 PM
Unknown Object (File)
Tue, Nov 12, 12:26 PM
Unknown Object (File)
Tue, Nov 12, 12:23 PM
Unknown Object (File)
Tue, Nov 12, 11:51 AM
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