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)
Wed, Nov 27, 4:54 AM
Unknown Object (File)
Oct 28 2024, 10:09 AM
Unknown Object (File)
Oct 3 2024, 9:58 AM
Unknown Object (File)
Oct 3 2024, 9:58 AM
Unknown Object (File)
Oct 3 2024, 9:58 AM
Unknown Object (File)
Oct 3 2024, 9:58 AM
Unknown Object (File)
Oct 3 2024, 9:58 AM
Unknown Object (File)
Sep 7 2024, 7:10 PM
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