HomePhabricator
Diffusion Comm 7d794306428b

[keyserver] Factor out fetchDataForSocketInit

Description

[keyserver] Factor out fetchDataForSocketInit

Summary:
We want to use this in a new endpoint, so I'm factoring it out. This endpoint will be used for recovering from a socket crash loop.

Depends on D12362

Test Plan:
I tested socket initialization before and after this and confirmed it still worked correctly.

Note that this is a pure move diff, except for some changes to the pattern of awaits in handleInitialClientSocketMessage, now that fetchDataForSocketInit happens before these three promises start:

processClientResponses(viewer, clientResponses),
isCookieMissingSignedIdentityKeysBlob(viewer.cookieID),
isCookieMissingOlmNotificationsSession(viewer),

I think it's safe to wait until after handleInitialClientSocketMessage to call these.

Reviewers: tomek

Reviewed By: tomek

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

Details

Provenance
ashoatAuthored on Jun 5 2024, 1:31 PM
Reviewer
tomek
Differential Revision
D12363: [keyserver] Factor out fetchDataForSocketInit
Parents
rCOMM5d9e86d18a66: [keyserver][lib] Move sessionStateValidator to lib
Branches
Unknown
Tags
Unknown