Page MenuHomePhabricator

[lib] Refactor logout in keyserver reducer
ClosedPublic

Authored by inka on Jan 17 2024, 5:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 9:51 PM
Unknown Object (File)
Fri, Nov 22, 9:04 PM
Unknown Object (File)
Wed, Nov 6, 12:34 PM
Unknown Object (File)
Oct 14 2024, 6:45 PM
Unknown Object (File)
Oct 14 2024, 6:45 PM
Unknown Object (File)
Oct 14 2024, 6:45 PM
Unknown Object (File)
Oct 14 2024, 6:45 PM
Unknown Object (File)
Oct 14 2024, 6:45 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
No Lint Coverage
Unit
No Test Coverage

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

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

I created to D10872 address this

This revision was automatically updated to reflect the committed changes.