Page MenuHomePhabricator

[CommRustModule] implement uploading one-time keys to Identity
ClosedPublic

Authored by kamil on Jan 3 2024, 7:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 4:24 AM
Unknown Object (File)
Mon, Dec 23, 4:24 AM
Unknown Object (File)
Mon, Dec 23, 4:24 AM
Unknown Object (File)
Mon, Dec 23, 4:24 AM
Unknown Object (File)
Mon, Dec 23, 4:23 AM
Unknown Object (File)
Nov 8 2024, 5:11 PM
Unknown Object (File)
Oct 28 2024, 2:57 AM
Unknown Object (File)
Oct 18 2024, 2:08 AM
Subscribers

Details

Summary

Upload keys using API

Depends on D10384

Test Plan
  1. Login to device, check deviceID and open DDB of Identity on staging
  2. Check number of one time keys
  3. Call this method
  4. Check DDb table if keys are there

Diff Detail

Repository
rCOMM Comm
Branch
publish-olm-stack-3
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jan 4 2024, 3:17 AM
marcin requested changes to this revision.Jan 4 2024, 4:00 AM
marcin added inline comments.
native/cpp/CommonCpp/NativeModules/CommRustModule.cpp
297–302

The capture of lambda passed to createPromiseAsJSIValue should be by copy ([=]). You can't guarantee that those arguments will live until lambda completes. If you don't want to copy jsi::Array arguments (they might be big) then wrap them in std::shared_ptr<>.

This revision now requires changes to proceed.Jan 4 2024, 4:00 AM
kamil requested review of this revision.Jan 5 2024, 2:45 AM
kamil added inline comments.
native/cpp/CommonCpp/NativeModules/CommRustModule.cpp
297–302

yeah, you're right, let's in this diff stick to the convention (even if it's wrong) and iterate on this in D10550

marcin added inline comments.
native/cpp/CommonCpp/NativeModules/CommRustModule.cpp
297–302

Usually we shouldn't create new diff to fix mistakes in another diff. But in this case you had to fix other methods implemented outside of this stack as well so we can proceed with this approach.

This revision is now accepted and ready to land.Jan 8 2024, 2:17 AM
This revision was landed with ongoing or failed builds.Jan 8 2024, 7:27 AM
This revision was automatically updated to reflect the committed changes.