[keyserver] disable socket connection when policies are not accepted
Summary:
Follow up to: https://phab.comm.dev/D5875#inline-39619, but instead of deleting the session it refuses to create it and forbids any communication via socket.
The reason for that change is the fact, that in the solution suggested in the linked comment we will not receive any data, but after the connection reset (like reloading on web app) socket will cause FULL_STATE_SYNC action, modal will still be visible but data will be fetched in the background, and we want to avoid that.
After accepting terms by user initializing the socket will cause fetching all needed data.
Test Plan:
- Logout user
- Set terms policy as not accepted for user in DB
- Login
- Accept terms
- Data should be properly fetched (messages, threads, calendar data, etc.)
- Test for both web/native
Reviewers: inka, michal, przemek, tomek
Reviewed By: tomek
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D6093