Page MenuHomePhabricator

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

Authored by kamil on Sep 18 2024, 5:01 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)
Sun, Nov 17, 9:05 AM
Unknown Object (File)
Tue, Nov 12, 2:26 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
Unknown Object (File)
Oct 22 2024, 10:21 AM
Subscribers

Details

Summary

ENG-9106.

Update context to support multiple devices.

Callsites are updated later in the stack.

Depends on D13371.

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.
kamil published this revision for review.Sep 18 2024, 5:42 AM
kamil edited the test plan for this revision. (Show Details)
tomek added inline comments.
lib/components/peer-olm-session-creator-provider.react.js
42–62 ↗(On Diff #44290)

This is a little fragile because when this function is called for different devices and the promise is still pending, we would return an existing promise. To fix this issue we should restore the promises map, assign the same promise to all the devices, and return Promise.all of all the promises associated with devices.

This revision is now accepted and ready to land.Sep 18 2024, 7:54 AM