HomePhabricator
Diffusion Comm a10f46bf7dc3

[keyserver] disable socket connection when policies are not accepted

Description

[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:

  1. Logout user
  2. Set terms policy as not accepted for user in DB
  3. Login
  4. Accept terms
  5. Data should be properly fetched (messages, threads, calendar data, etc.)
  6. Test for both web/native

Reviewers: inka, michal, przemek, tomek

Reviewed By: tomek

Subscribers: ashoat, tomek, atul

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

Details

Provenance
kamilAuthored on Dec 29 2022, 2:24 AM
Reviewer
tomek
Differential Revision
D6093: [keyserver] disable socket connection when policies are not accepted
Parents
rCOMM0389fd22a3c2: [lib] validate policies after user login
Branches
Unknown
Tags
Unknown