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
F3170774: D11841.id39887.diff
Thu, Nov 7, 1:10 PM
Unknown Object (File)
Thu, Oct 24, 11:02 PM
Unknown Object (File)
Wed, Oct 23, 12:13 PM
Unknown Object (File)
Mon, Oct 21, 12:28 PM
Unknown Object (File)
Fri, Oct 18, 2:04 AM
Unknown Object (File)
Thu, Oct 17, 11:15 AM
Unknown Object (File)
Tue, Oct 15, 6:05 PM
Unknown Object (File)
Sun, Oct 13, 11:44 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