[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:
- Make sure policies still work
The issue we want to fix:
- Revert diff D9295
- On the login screen call the keyserver endpoint which requires policies
- Check if an error was thrown on a keyserver
- Make sure the modal is not shown
Reviewers: michal, tomek
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D9320