Page MenuHomePhabricator

[lib] refactor `createOlmSessionWithPeer` -> `createOlmSessionsWithUser`
ClosedPublic

Authored by kamil on Sep 18 2024, 4:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 7:02 AM
Unknown Object (File)
Wed, Nov 20, 6:40 AM
Unknown Object (File)
Wed, Nov 13, 8:02 PM
Unknown Object (File)
Wed, Nov 13, 8:00 PM
Unknown Object (File)
Tue, Nov 12, 2:39 PM
Unknown Object (File)
Oct 22 2024, 10:41 AM
Unknown Object (File)
Oct 22 2024, 10:21 AM
Unknown Object (File)
Oct 22 2024, 10:21 AM
Subscribers

Details

Summary

ENG-9106.

This API better matches Identity API, which returns data for all user devices.

Additionally, session creation for each device is done in parallel.

Test Plan

Tested in D13376

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
lib/utils/crypto-utils.js
184 ↗(On Diff #44289)

This change is a fix for ENG-9278.

We shouldn't throw it as this is a regular case:

  • having singleton device list
  • having an out-of-sync device list in auxUserStore (e.g. device on logout failed to send updates) - created ENG-9332 to track.
kamil published this revision for review.Sep 18 2024, 5:42 AM
kamil edited the test plan for this revision. (Show Details)
lib/components/peer-olm-session-creator-provider.react.js
13–16 ↗(On Diff #44289)

It's weird that this is defined here but SessionCreationOptions is defined above createOlmSessionsWithUser

Would it make sense to move this definition to be closer to SessionCreationOptions?

This revision is now accepted and ready to land.Sep 18 2024, 7:21 AM
lib/utils/crypto-utils.js
243–247 ↗(On Diff #44289)

It might be a good idea to also log an exception

  • log exception
  • move type definition to a better place