Page MenuHomePhabricator

[native] use short form for prekeys
ClosedPublic

Authored by varun on Mar 12 2024, 1:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 8:52 PM
Unknown Object (File)
Thu, Nov 28, 11:50 PM
Unknown Object (File)
Thu, Nov 28, 10:54 PM
Unknown Object (File)
Nov 25 2024, 5:33 AM
Unknown Object (File)
Nov 7 2024, 3:31 AM
Unknown Object (File)
Oct 26 2024, 1:40 AM
Unknown Object (File)
Oct 15 2024, 8:36 PM
Unknown Object (File)
Oct 15 2024, 8:36 PM
Subscribers

Details

Summary

parse the prekey blob string using folly and then convert the std::string to a rust::String / jsi::String

Test Plan

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Mar 12 2024, 1:15 PM

Can you link the diff where you update parsing prekeys when creating a session and land those two together? Now it's not possible to create a session between two native devices.

This revision is now accepted and ready to land.Mar 14 2024, 2:48 AM

Can you link the diff where you update parsing prekeys when creating a session and land those two together? Now it's not possible to create a session between two native devices.

I see stack now, sorry!

native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
587 ↗(On Diff #38031)

I would add two checks:

  1. Check if what we have under "curve22519" is folly dynamic object and if values doesn't return empty iterator. I my gists that I shared on Linear I didn't do those checks but those gists weren't code intended to run in production.
  2. Surround it with try{}...catch(const folly::json::parse_error &e){}.

In case anything fails we will have more informative errors.

native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
587 ↗(On Diff #38031)
This revision was automatically updated to reflect the committed changes.