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
F3532956: D10510.id35158.diff
Wed, Dec 25, 10:33 AM
F3532900: D10510.id35381.diff
Wed, Dec 25, 10:11 AM
F3530056: D10510.diff
Tue, Dec 24, 11:17 PM
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
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.