HomePhabricator
Diffusion Comm 7892c40d9141

[identity] Add GetDeviceListForUser RPC

Description

[identity] Add GetDeviceListForUser RPC

Summary:
Resolves ENG-5049. According to the whitepaper and the Linear task, client needs all device list updates since the last time it asked for them. This RPC is used to get device list history for a user.

The response format complies to the whitepaper (Fig. 4) although it doesn't include signing information yet (this can be easily added in the future).

Depends on D10247

Test Plan:
Similiar to D10247 test plan:
Added three device list updates to DDB. Then called the RPC

  • Without timestamp, all three are returned. They're JSON-encoded and JSON.parse() returns a valid JS object.
  • Given timestamp T, where U1 < T < U2 < U3, the function returned U2 and U3.
  • Empty list is returned if timestamp is after all updates.
  • Empty list is returned if the user has no device lists yet (of the new format, i.e. not yet migrated).

Reviewers: ashoat, varun, michal

Reviewed By: ashoat, varun

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D10301

Details

Provenance
bartekAuthored on Dec 10 2023, 8:19 AM
Reviewer
ashoat
Differential Revision
D10301: [identity] Add GetDeviceListForUser RPC
Parents
rCOMM230d6c05f67e: [identity] Add function to get device list history
Branches
Unknown
Tags
Unknown