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)
Thu, Nov 7, 3:31 AM
Unknown Object (File)
Sat, Oct 26, 1:40 AM
Unknown Object (File)
Tue, Oct 15, 8:36 PM
Unknown Object (File)
Tue, Oct 15, 8:36 PM
Unknown Object (File)
Tue, Oct 15, 8:35 PM
Unknown Object (File)
Tue, Oct 15, 8:35 PM
Unknown Object (File)
Sep 1 2024, 1:45 AM
Unknown Object (File)
Aug 30 2024, 8:00 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.