Page MenuHomePhabricator

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

Authored by michal on Mar 18 2024, 8:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 24, 12:23 AM
Unknown Object (File)
Tue, Dec 24, 12:23 AM
Unknown Object (File)
Tue, Dec 24, 12:23 AM
Unknown Object (File)
Tue, Dec 24, 12:23 AM
Unknown Object (File)
Tue, Dec 24, 12:23 AM
Unknown Object (File)
Thu, Nov 28, 7:03 PM
Unknown Object (File)
Thu, Nov 28, 7:03 PM
Unknown Object (File)
Nov 25 2024, 3:32 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
Lint Not Applicable
Unit
Tests Not Applicable

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.