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
Details
- Reviewers
michal kamil ginsu - Commits
- rCOMM488d2f71605a: [lib] Refactor reduceMessageStore
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.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/reducers/message-reducer.js | ||
---|---|---|
752 ↗ | (On Diff #35462) | Web redux default state has currentAsOf: { [ashoatKeyserverID]: 0 }. I assume that's ok for now, and it will be removed from default state after we switch to using these actions? |
lib/reducers/message-reducer.js | ||
---|---|---|
752 ↗ | (On Diff #35462) | For now Ashoat's keyserver has to stay in the store at all times, so this needs to be fixed. Thanks for catching this! |
Fix currentAsOf. Made a note in ENG-5800 to update this when default state is updated