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)
Tue, Oct 29, 9:46 PM
Unknown Object (File)
Fri, Oct 25, 11:02 PM
Unknown Object (File)
Wed, Oct 23, 1:19 AM
Unknown Object (File)
Tue, Oct 22, 9:55 PM
Unknown Object (File)
Fri, Oct 18, 1:09 AM
Unknown Object (File)
Fri, Oct 18, 1:09 AM
Unknown Object (File)
Fri, Oct 18, 1:09 AM
Unknown Object (File)
Fri, Oct 18, 1:09 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
Branch
publish-olm-stack
Lint
No Lint Coverage
Unit
No Test Coverage

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

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.