HomePhabricator
Diffusion Comm 925f1b6550b5

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

Description

[web/native] Use olmAPI instead of OlmSessionCreatorContext

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)

Reviewers: kamil, tomek

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D11347