HomePhabricator
Diffusion Comm ebd75b43cb52

[lib][web][native] Move deviceToken to keyserverStore

Description

[lib][web][native] Move deviceToken to keyserverStore

Summary:
issue: https://linear.app/comm/issue/ENG-5284/refactor-setdevicetoken-action
We will need to communicate the device token to every keyserver we are connected to. The device token may change. A keyserver might not have our current device token. Each keyserver may realise they have the wrong token at a different time. We want to keep track of each keyservers knowledge. I am moving the logic that was used for one keyserver to multiple keyservers. This logic is flawed, but it will be updated in a different task: https://linear.app/comm/issue/ENG-5599/device-token-setting-mechanizm

Test Plan:
Checked:

The migration, the keyserver selectors, sanitizeState, logInExtraInfoSelector

that the reducer sets the device token in the keyserver store on setDeviceTokenActionTypes.success action,

that the notifs still work,

that when the ks has an incorrect device token it is able to get a new one in the same way as it was before

checked that if a user turns off and back on the notifications, they work

checked that login works. Assuming that register and siweAuth work by symmetry

ran yarn flow-all

Reviewers: michal, kamil, ginsu, marcin

Reviewed By: michal

Subscribers: marcin, ashoat, tomek, wyilio

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

Details

Provenance
inkaAuthored on Oct 27 2023, 8:56 AM
Reviewer
michal
Differential Revision
D9622: [lib][web][native] Move deviceToken to keyserverStore
Parents
rCOMM3c03d9566d3b: [lib/keyserver] configure Tunnelbroker URL
Branches
Unknown
Tags
Unknown