Page MenuHomePhabricator

[lib] add device list type to `AuxUserInfo`
ClosedPublic

Authored by kamil on Apr 30 2024, 6:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 20, 11:39 PM
Unknown Object (File)
Sat, Oct 12, 2:34 AM
Unknown Object (File)
Fri, Oct 11, 10:15 PM
Unknown Object (File)
Fri, Oct 11, 9:12 PM
Unknown Object (File)
Fri, Oct 11, 1:06 PM
Unknown Object (File)
Fri, Oct 11, 12:43 PM
Unknown Object (File)
Fri, Oct 11, 11:08 AM
Unknown Object (File)
Thu, Oct 10, 7:53 PM
Subscribers

Details

Summary

ENG-7394.

This is a simple diff to add a device list type to where it'll be stored and accessed.
With this type this works fine without migration, we could also update the type to deviceList: ?RawDeviceList but then we'll need a migration that reads the data from DB, convert it to objects, adds deviceList: null, and saves it in DB to make it safe - don't have a strong opinion about it.

We want this field to be nullable, this will indicate that we have a new user, and we need to fetch the device list for it from Identity, which will be implemented in ENG-7824. (cc. @inka)

Test Plan

FLow

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:24 AM
kamil edited the summary of this revision. (Show Details)

With this type this works fine without migration, we could also update the type to deviceList: ?RawDeviceList but then we'll need a migration that reads the data from DB, convert it to objects, adds deviceList: null, and saves it in DB to make it safe - don't have a strong opinion about it.

No opinion on this

lib/types/aux-user-types.js
5 ↗(On Diff #39692)

I was wondering if we should keep SignedDeviceList instead of RawDeviceList but finally I think we should not.
The signatures are required only for verification when received an update, after that they're no longer useful and can be dropped

This revision is now accepted and ready to land.May 6 2024, 7:50 AM
lib/types/aux-user-types.js
5 ↗(On Diff #39692)

another thing is that in the case of SignedDeviceList whenever selecting this from the store we'll have to parse the rawDeviceList string - here we have easy access to list of ids

This revision was automatically updated to reflect the committed changes.