Page MenuHomePhabricator

[native] Create initial device list during registration
ClosedPublic

Authored by bartek on May 16 2024, 12:00 AM.
Tags
None
Referenced Files
F2838256: D12067.id40323.diff
Sat, Sep 28, 9:28 PM
F2838251: D12067.id40277.diff
Sat, Sep 28, 9:26 PM
F2837687: D12067.diff
Sat, Sep 28, 7:26 PM
Unknown Object (File)
Aug 29 2024, 5:40 AM
Unknown Object (File)
Aug 27 2024, 1:32 AM
Unknown Object (File)
Aug 26 2024, 1:41 PM
Unknown Object (File)
Aug 1 2024, 12:46 AM
Unknown Object (File)
Aug 1 2024, 12:46 AM
Subscribers

Details

Summary
  • Extracted utility function to generate RawDeviceList from given list of devices and current timestamp.
  • Created a function to create and sign initial device list - it creates a singleton array [primaryDeviceID], then signs via Olm.
  • Called the function in registerWalletUser and registerPasswordUser functions of identityClient

Depends on D12066

Test Plan
  1. In Identity Service, printed the value of initial_device_list in RPC handlers
  2. Registered a password user and a wallet user
  3. Confirmed that device list JSON payload is printed in Identity

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.May 16 2024, 12:53 AM
bartek added inline comments.
lib/shared/device-list-utils.js
124

Not sure if this is the best place for this function, it is going to be called only on native.

kamil added inline comments.
lib/shared/device-list-utils.js
124

I think it's okay - this function is implemented in a way that can be used on both platforms if ever needed.

This revision is now accepted and ready to land.May 16 2024, 1:58 AM