Page MenuHomePhabricator

[native] use short form for prekeys
ClosedPublic

Authored by varun on Mar 12 2024, 1:00 PM.
Tags
None
Referenced Files
F3384965: D11312.id38031.diff
Thu, Nov 28, 10:54 PM
Unknown Object (File)
Mon, Nov 25, 5:33 AM
Unknown Object (File)
Thu, Nov 7, 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
Unknown Object (File)
Oct 15 2024, 8:35 PM
Unknown Object (File)
Oct 15 2024, 8:35 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
Branch
limit1keyserver (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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

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.

This revision was automatically updated to reflect the committed changes.