HomePhabricator
Diffusion Comm bc919fd2511d

[lib] don't dispatch policy acknowledgment action when user is not logged in

Description

[lib] don't dispatch policy acknowledgment action when user is not logged in

Summary:
Enhancement to previous diff.
Avoid dispatching forcePolicyAcknowledgmentActionType for not logged-in users.
Added also handling logout in policies reducer.

Depends on D9295

Test Plan:
Logic:

  1. Make sure policies still work

The issue we want to fix:

  1. Revert diff D9295
  2. On the login screen call the keyserver endpoint which requires policies
  3. Check if an error was thrown on a keyserver
  4. Make sure the modal is not shown

Reviewers: michal, tomek

Reviewed By: tomek

Subscribers: ashoat

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