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)
Tue, Oct 22, 10:41 AM
Unknown Object (File)
Tue, Oct 22, 10:21 AM
Unknown Object (File)
Tue, Oct 22, 10:21 AM
Unknown Object (File)
Tue, Oct 22, 10:21 AM
Unknown Object (File)
Sun, Oct 20, 7:45 PM
Unknown Object (File)
Sat, Oct 19, 3:22 AM
Unknown Object (File)
Sat, Oct 19, 3:20 AM
Unknown Object (File)
Sat, Oct 19, 1:35 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