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)
Mon, Nov 18, 10:43 AM
Unknown Object (File)
Thu, Nov 7, 12:17 AM
Unknown Object (File)
Oct 18 2024, 4:14 AM
Unknown Object (File)
Oct 18 2024, 4:14 AM
Unknown Object (File)
Oct 18 2024, 4:14 AM
Unknown Object (File)
Oct 18 2024, 4:14 AM
Unknown Object (File)
Oct 18 2024, 4:14 AM
Unknown Object (File)
Sep 6 2024, 9:27 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 😉