Page MenuHomePhabricator

[lib] Refactor fullStateSyncActionType in reducers
ClosedPublic

Authored by inka on Mar 13 2024, 8:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 7:23 AM
Unknown Object (File)
Apr 2 2024, 3:21 PM
Unknown Object (File)
Apr 1 2024, 2:14 AM
Unknown Object (File)
Mar 28 2024, 12:51 AM
Unknown Object (File)
Mar 22 2024, 10:15 AM
Unknown Object (File)
Mar 22 2024, 6:54 AM
Unknown Object (File)
Mar 21 2024, 5:12 PM
Unknown Object (File)
Mar 20 2024, 10:25 AM
Subscribers

Details

Summary

issue: ENG-6484
fullStateSyncActionType always concerns only one keyserver. It is a "specific" action. It has a keyserverID in the payload.

reduceIntegrityStore -> we should not clear the whole store, only remove the threads related to this keyserver

reduceThreadInfos -> we shouldn't remove all threads, only the threads related to this keyserver

reduceCurrentUserInfo -> it should not change currentUserInfo for clients not relying on authoritative keyserver

reduceUserInfos -> it shouldn't be removing user infos for clients not relying on authoritative keyserver

Test Plan

tested that only threads related to the keyserver the action concerns are removed from thread store, and only their hashes are removed from integrity store. Checked that for clients relying on authoritative keyserver currentUserInfo and userStore are being changed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Mar 13 2024, 9:15 AM
lib/reducers/user-reducer.js
111–113 ↗(On Diff #38040)

Flow gets confused if I merge this if with the one above

285–287 ↗(On Diff #38040)

Flow gets confused if I merge this if with the one above

Fix broken legacy logins

michal added a subscriber: will.
michal added inline comments.
lib/reducers/integrity-reducer.js
19 ↗(On Diff #38040)

cc @will as he's also working on integrity store (moving it to sqlite).

This revision is now accepted and ready to land.Mar 14 2024, 3:49 AM