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)
Tue, Apr 23, 1:51 AM
Unknown Object (File)
Tue, Apr 23, 1:51 AM
Unknown Object (File)
Tue, Apr 23, 1:49 AM
Unknown Object (File)
Tue, Apr 23, 1:47 AM
Unknown Object (File)
Apr 3 2024, 2:32 PM
Unknown Object (File)
Apr 1 2024, 11:07 PM
Unknown Object (File)
Mar 26 2024, 11:43 PM
Unknown Object (File)
Mar 25 2024, 9:38 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.