Page MenuHomePhabricator

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

Authored by kamil on Tue, Apr 30, 6:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 16, 4:53 PM
Unknown Object (File)
Thu, May 16, 1:22 PM
Unknown Object (File)
Wed, May 15, 10:03 AM
Unknown Object (File)
Tue, May 14, 3:42 PM
Unknown Object (File)
Mon, May 13, 2:51 AM
Unknown Object (File)
Sat, May 11, 9:31 PM
Unknown Object (File)
Fri, May 10, 4:22 AM
Unknown Object (File)
Fri, May 10, 4:22 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.Mon, May 6, 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.Tue, May 7, 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