HomePhabricator
Diffusion Comm beb3df179ce2

[keyserver][lib] Remove id from LoggedOutUserInfo

Description

[keyserver][lib] Remove id from LoggedOutUserInfo

Summary:
issue: https://linear.app/comm/issue/ENG-5281/refactor-logout-and-deleteaccount-actions
We need to remove the id field from LoggedOutUserInfo, because it doesn't make sense in multikeyserver world for the keyserver to set some user id for the logged out user. It wasn't really being used anyway - right after the app is freshly built, the whole currentUserInfo is null. I couldn't just make it null though, because the app was behaving incorrectly then (see the linear issue's comments)

Test Plan:
Tested that it is possible to log out and back in. No errors show up.
Ran yarn flow-all.

TESTED OLD CLIENTS:

  1. Built the client on master, without this diff applied
  2. Ran metro, opened the app
  3. Killed metro
  4. Ran the keyserver on this branch, with this diff applied
  5. Logged out
  6. Logged in

No errors appeared on keyserver console, checked in redux devtools that logout and login actions were successful. The client didn't show any errors.
The currentUserInfo after logout was {anonymous: true}, but this didn't cause any problems - I clicked around on the login/register screens and no errors showed up. I was able to register a new user (I used the new registration flow). This is consistent with the theory this diff is based on - that the id wasn't begin used when not logged in

Reviewers: michal, kamil, ginsu

Reviewed By: michal

Subscribers: ashoat, tomek, wyilio

Differential Revision: https://phab.comm.dev/D9640

Details

Provenance
inkaAuthored on Oct 31 2023, 12:50 AM
Reviewer
michal
Differential Revision
D9640: [keyserver][lib] Remove id from LoggedOutUserInfo
Parents
rCOMM4be92668a75c: [keyserver][lib][native] Refactor getVersion action
Branches
Unknown
Tags
Unknown