HomePhabricator
Diffusion Comm 891b92ac7c86

[lib] Refactor user reducer

Description

[lib] Refactor user reducer

Summary:
issue: ENG-5815
When we log in to a keyserver, we get the list of its users. But as we disconnect from a keyserver (remove it from the list of connected keyservers) we don't want to remove the users from our store - we might still want to be able to talk to users we got to know about.

Removing them from our store when we disconnect from a common keyserver would be quite complicated, because we might have other common keyservers. For now we just leave the users in the store.

Delete account and logout actions will not be refactored any further, so we want to keep the old behaviour as is if not using CSAT

Test Plan: Tested that if KEYSERVER_AUTH_SUCCESS is dispatched with a new user in userInfos, this user is added to the store, and no users are deleted. Tested that when the user logs out of the app, all users are sill removed from the store

Reviewers: michal, kamil, ginsu

Reviewed By: michal, ginsu

Subscribers: ashoat, tomek

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

Details

Provenance
inkaAuthored on Jan 15 2024, 2:47 AM
Reviewer
michal
Differential Revision
D10628: [lib] Refactor user reducer
Parents
rCOMM4160b885c356: [lib] Refactor thread reducer
Branches
Unknown
Tags
Unknown