HomePhabricator
Diffusion Comm 3ea6697f5b02

[lib, native,keyserver] Add KeyserverStore

Description

[lib, native,keyserver] Add KeyserverStore

Summary:
https://linear.app/comm/issue/ENG-4265/refactor-cookie-redux-field-for-multiple-keyservers
Adding keyserverStore field to redux that will hold keyserver-specific information. Currently it only has a cookie field.
We plan to remove the cookie field from redux, and have the cookie field in keyserverStore replace it. But in the interest of keeping the diffs small I will remove the cookie field later.
Previously we had a cookie?: void field on web, because we were not using it, but we needed it to exist for flow. Native had cookie: ?string. We plan to start using the cookie field on web in the future, and this stack is preparation
for it, so we do want the type on web to be changed. BUT for now we have not yet implemented the logic for using this field on web, so even though the type is changed, we want to keep the old functionality. So the important thing is
that we need the cookie on web to be undefined, and on native to be null or string, as they were before. The cookie field is defined as cookie?: ?string to allow this, but should be changed to cookie: ?string once ENG-4347 is done.

In this first iteration we are hardcoding the id of our keyserver

Test Plan: ran yarn flow-all. Checked using git grep that in all placed the cookie field is being set, I am also setting the keyserverStrore.keyserverInfos[].cookie

Reviewers: michal, kamil

Reviewed By: michal

Subscribers: ashoat, tomek

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

Details

Provenance
inkaAuthored on Jul 13 2023, 7:36 AM
Reviewer
michal
Differential Revision
D8532: [lib, native,keyserver] Add KeyserverStore
Parents
rCOMMa5f86d93ef11: [keyserver, lib, native] Change keyserverPrefixID to ashoatKeyserverID
Branches
Unknown
Tags
Unknown