Page MenuHomePhabricator

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

Authored by kamil on Sep 18 2024, 5:01 AM.
Tags
None
Referenced Files
F3012470: D13372.id44332.diff
Sat, Oct 19, 3:22 AM
F3012464: D13372.id44290.diff
Sat, Oct 19, 3:20 AM
F3011568: D13372.id44325.diff
Sat, Oct 19, 1:35 AM
Unknown Object (File)
Tue, Oct 15, 9:00 PM
Unknown Object (File)
Sat, Oct 5, 7:14 PM
Unknown Object (File)
Sat, Oct 5, 5:05 PM
Unknown Object (File)
Thu, Oct 3, 6:19 PM
Unknown Object (File)
Thu, Oct 3, 2:46 PM
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