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)
Thu, Apr 11, 11:06 AM
Unknown Object (File)
Tue, Apr 2, 7:02 PM
Unknown Object (File)
Mon, Apr 1, 5:16 AM
Unknown Object (File)
Mar 27 2024, 4:07 PM
Unknown Object (File)
Mar 25 2024, 5:30 PM
Unknown Object (File)
Mar 23 2024, 2:39 AM
Unknown Object (File)
Mar 22 2024, 10:37 PM
Unknown Object (File)
Mar 21 2024, 3:02 PM
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.