Page MenuHomePhabricator

[lib] Refactor logout in keyserver reducer
ClosedPublic

Authored by inka on Jan 17 2024, 5:37 AM.
Tags
None
Referenced Files
F3525635: D10658.id35902.diff
Mon, Dec 23, 5:55 PM
F3525634: D10658.id36284.diff
Mon, Dec 23, 5:55 PM
F3525633: D10658.id35720.diff
Mon, Dec 23, 5:55 PM
F3525632: D10658.id35941.diff
Mon, Dec 23, 5:55 PM
F3525631: D10658.id35778.diff
Mon, Dec 23, 5:55 PM
F3525619: D10658.id.diff
Mon, Dec 23, 5:55 PM
F3525614: D10658.diff
Mon, Dec 23, 5:55 PM
Unknown Object (File)
Sun, Dec 22, 8:25 PM
Subscribers

Details

Summary

issue: ENG-5826
We want to only remove the keyservers that the user has disconnected from. The only exception is Ashoat's keyserver, which always needs to be in the store. Additionally to what we were removing from it before I removed lateResponses. lateResponses include message ids, so I'm not sure if it would be ba security breach to leave them. But it looks like this field is only used for the disconnected bar, which is not shown on the logout screen anyway, and soon will not be even connected to the keyserver connection, but to the internet connection (ENG-6137)

Test Plan

Ran the provided test

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

We are discussing in ENG-6424 if logout should be refactored, but delete account has to be refactored anyway

inka requested review of this revision.Jan 17 2024, 5:55 AM
inka planned changes to this revision.EditedJan 17 2024, 8:16 AM

We decided to have a single action for identity and ks logout

lib/reducers/keyserver-reducer.js
337–356 ↗(On Diff #35778)

I think we can reduce indentation here. Try inverting the first condition

Merge identity delete account with keyserver delete account

michal added inline comments.
lib/reducers/keyserver-reducer.js
355 ↗(On Diff #35941)

I wonder if we should also add this lateResponses to the logOut/deleteAccount.

This revision is now accepted and ready to land.Jan 29 2024, 6:23 AM
lib/reducers/keyserver-reducer.js
355 ↗(On Diff #35941)

I created to D10872 address this

This revision was automatically updated to reflect the committed changes.