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)
Tue, Nov 12, 11:55 AM
Unknown Object (File)
Tue, Nov 12, 3:41 AM
Unknown Object (File)
Tue, Nov 12, 3:34 AM
Unknown Object (File)
Tue, Nov 12, 12:56 AM
Unknown Object (File)
Mon, Nov 11, 6:46 PM
Unknown Object (File)
Sun, Oct 20, 11:39 PM
Unknown Object (File)
Oct 12 2024, 2:34 AM
Unknown Object (File)
Oct 11 2024, 10:15 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
No Lint Coverage
Unit
No Test Coverage

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

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

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.