Page MenuHomePhabricator

[CommRustModule] update `getOutboundKeys` to return all devices
ClosedPublic

Authored by kamil on Dec 18 2023, 4:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 28, 1:55 AM
Unknown Object (File)
Thu, Jun 27, 5:11 AM
Unknown Object (File)
Tue, Jun 25, 9:58 AM
Unknown Object (File)
Sun, Jun 23, 10:58 AM
Unknown Object (File)
Wed, Jun 19, 8:32 PM
Unknown Object (File)
Fri, May 31, 6:59 PM
Unknown Object (File)
May 22 2024, 2:15 PM
Unknown Object (File)
May 20 2024, 9:02 AM
Subscribers

Details

Summary

To create a session with all other devices of a given user we don't know the IDs of specific devices so we need to get all of them.
I think it's more convenient to update this method (later we can filter if we want a specific ID) rather than introducing a new JSI method.

Depends on D10372

Test Plan
  1. Login to staging Identity (loginPasswordUser) on two devices using the same account.
  2. Call this method and check if the result is correct (two devices).

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Dec 18 2023, 6:48 AM

Look like we can waste a one-time key each time we call it because it is also returns one-time caller which will never be used, I'll create a follow-up task to fix it somehow

marcin added 2 blocking reviewer(s): michal, varun.

LGTM for me. Personally I would prefer to do some JSON parsing in C++ to return $ReadOnlyArray<...> to JS but leaving this up to you. I am resigning since it is better if someone more experienced in Rust sees this code.

michal added inline comments.
native/native_rust_library/src/lib.rs
120–121 ↗(On Diff #34787)

Please also update the _helper function name

This revision is now accepted and ready to land.Dec 26 2023, 12:46 PM
This revision was landed with ongoing or failed builds.Jan 8 2024, 6:48 AM
This revision was automatically updated to reflect the committed changes.