HomePhabricator
Diffusion Comm 488d2f71605a

[lib] Refactor reduceMessageStore

Description

[lib] Refactor reduceMessageStore

Summary:
issue: ENG-5821
On identity login we want to remove old messages from the store. Identity doesn't return any messages, so messageInfos, truncationStatus and currentAsOf are empty
threadInfos come from thread reducer, which will be udated to remove all threads on identity login

Test Plan:
Tested that if a user is logged in to the app, and connected to Ashoat's keyserver, and then logs in to another keserver using keyserverAuthActionTypes, the new messages provided by this keyserver are saved in the message store (if the corresponding thread was saved in the thread store)
Tested that if tempIdentityLoginActionTypes.success is dispatched, the messages in the message store get wiped.

Reviewers: michal, kamil, ginsu

Reviewed By: michal

Subscribers: ashoat, tomek

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

Details

Provenance
inkaAuthored on Jan 9 2024, 6:25 AM
Reviewer
michal
Differential Revision
D10589: [lib] Refactor reduceMessageStore
Parents
rCOMMbc8828d76c4b: [web/native/lib] Combine openSocketSelector from web and native
Branches
Unknown
Tags
Unknown