Page MenuHomePhabricator

[web/native] Use olmAPI instead of `OlmSessionCreatorContext`
ClosedPublic

Authored by michal on Mar 18 2024, 8:50 AM.
Tags
None
Referenced Files
F3363275: D11347.diff
Mon, Nov 25, 1:23 AM
Unknown Object (File)
Wed, Nov 6, 2:56 PM
Unknown Object (File)
Oct 15 2024, 2:34 PM
Unknown Object (File)
Oct 15 2024, 2:34 PM
Unknown Object (File)
Oct 15 2024, 2:34 PM
Unknown Object (File)
Oct 15 2024, 2:34 PM
Unknown Object (File)
Oct 15 2024, 2:34 PM
Unknown Object (File)
Sep 7 2024, 12:34 AM
Subscribers

Details

Summary

ENG-6656 : Update the web code to use new cryptoStore

Now that olmAPI has both the outbound content sessions creation and notification session creation we can replace calls to OlmSessionCreatorContext with calls to olmAPI. Alternatively we could keep the context as a small shim to the shared worker methods (similary to how currently context on native just calls the native methods) but I think this way is better.

Note: this diff won't be landed with the future diffs that migrate other uses of crypto store in redux to shared worekr

Depends on D11342

Test Plan

Tested on web, as on native it calls the same underlying methods.

  • Logged in to a keyserver in a single-keyserver mode, made sure that that there was a new row in olm_sessions table corresponding to the new cookie, with is_content = 0. Checked that web notifs were decrypted and shown.
  • Triggered login in a multi-keyserver/usingCSAT mode, checked that keyserver-connection-handler.js correctly created content + notifications sessions (note: this required additional changes from D11319 to work)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

This revision is now accepted and ready to land.Mar 19 2024, 6:11 AM

Removed crypto-utils.js as the minimal logic that was there was merged into olmAPI in the previous diffs.