HomePhabricator
Diffusion Comm 6b1d03f8fa40

[identity] Augment get_keys_for_user to use devices table

Description

[identity] Augment get_keys_for_user to use devices table

Summary:
Updated DatabaseClient::get_keys_for_user to get device keys from devices table and fallback to users table if they're missing.

This code can be greatly simplified once we remove "legacy" devices attribute from users table.

Depends on D10302

Test Plan:

  • Prepared two users: One with keys in both tables and one with keys only in users table
  • Called GetInboundKeysForUser and GetOutboundKeysForUser RPCs - they were able to fetch keys information for both users

Reviewers: varun, michal

Reviewed By: varun

Subscribers: ashoat, tomek

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

Details

Provenance
bartekAuthored on Dec 11 2023, 10:41 AM
Reviewer
varun
Differential Revision
D10303: [identity] Augment get_keys_for_user to use devices table
Parents
rCOMM478280da1600: [identity] Make set_prekey() update devices table too
Branches
Unknown
Tags
Unknown