HomePhabricator
Diffusion Comm 9e3da11b867f

[web/native] Create tunnelbroker init message on connection

Description

[web/native] Create tunnelbroker init message on connection

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

Previously implemented in D11348 but some issues have been noticed and the required changes were large enough that I decided to split them into a separate diff

  • useTunnelbrokerInitMessage/createTunnelbrokerInitMessage can now we be used cross-platform because of the new web olmAPI so they have been merged into lib TunnelbrokerProvider
  • Now the tunnelbroker message is created async when making a new tunnelbroker connection which should fix an issue where the deviceID wasn't current

Depends on D11347

Test Plan:

  • Logged into identity -> tunnelbroker connected automatically as auth
  • Set unauthorizedDeviceID -> tunnelbroker switched connection to unauth
  • Unset unauthorizedDeviceID -> tunnelbroker switched back to auth connection
  • Logged out -> tunnelbroker connection was closed

Reviewers: kamil, tomek, bartek

Reviewed By: kamil, bartek

Subscribers: ashoat

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