HomePhabricator
Diffusion Comm 11d3d25c2b1f

[keyserver] Introduce getInitialReduxStateResponder

Description

[keyserver] Introduce getInitialReduxStateResponder

Summary:
ENG-4751
Depends on D9111

This diff creates the definition of the new getInitialReduxStateResponder. It takes URLInfo as the input, because we can generate it on the client, and that makes it more consistent with the rest of the responders. The output is modified from initial redux state in website responder:

  • removed all top-level fields which were always set to a default (except for commServicesAccessToken which I assume will be filled in here in the future)
  • instead of UserStore return UserInfos (the inconsistencyReports field is always set to default, so it will be set on client)
  • keyserverInfo contains only sessionID and updatesCurrentAsOf because:
    • cookie and lastCommunicatedPlatformDetails are persisted
    • connection is reset to default after reload
    • urlPrefix is set to default (and will be probably persisted later)

Also we only return keyserverInfo instead of a keyserverStore. To me it seems clearer that the keyserver only returns the data for itself, instead of the whole store. Assigning it to the ashoats keyserver data will be done on the client.

Test Plan: yarn flow

Reviewers: inka, kamil, atul

Reviewed By: kamil

Subscribers: ashoat, tomek

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

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Sep 5 2023, 1:50 AM
Reviewer
kamil
Differential Revision
D9122: [keyserver] Introduce getInitialReduxStateResponder
Parents
rCOMM9cb13605580b: [keyserver] Remove old current user info
Branches
Unknown
Tags
Unknown

Event Timeline