Page MenuHomePhabricator

[identity] Augment get_keys_for_user to use devices table
ClosedPublic

Authored by bartek on Dec 12 2023, 1:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 27, 9:35 PM
Unknown Object (File)
Thu, Jun 27, 8:07 PM
Unknown Object (File)
Wed, Jun 26, 4:08 PM
Unknown Object (File)
Tue, Jun 25, 11:31 PM
Unknown Object (File)
Tue, Jun 25, 12:53 PM
Unknown Object (File)
Tue, Jun 25, 12:53 PM
Unknown Object (File)
Tue, Jun 25, 12:53 PM
Unknown Object (File)
Tue, Jun 25, 12:53 PM
Subscribers

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Dec 12 2023, 3:20 AM
varun added inline comments.
services/identity/src/database/device_list.rs
486 ↗(On Diff #34512)

compatibility

This revision is now accepted and ready to land.Dec 19 2023, 8:39 PM
services/identity/src/database/device_list.rs
486 ↗(On Diff #34512)

Thanks for catching all these typos (including my other diffs)! 🙏 This encouraged me to enable spellchecking in my editor so hopefully I'll do better in the future 😉