Page MenuHomePhabricator

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

Authored by kamil on Tue, Apr 30, 6:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 15, 5:56 PM
Unknown Object (File)
Mon, May 13, 3:23 PM
Unknown Object (File)
Sun, May 12, 5:30 AM
Unknown Object (File)
Sun, May 12, 12:14 AM
Unknown Object (File)
Fri, May 10, 4:22 AM
Unknown Object (File)
Fri, May 10, 4:22 AM
Unknown Object (File)
Fri, May 10, 4:22 AM
Unknown Object (File)
Fri, May 10, 4:21 AM
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.Mon, May 6, 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.Mon, May 6, 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.