HomePhabricator
Diffusion Comm 13cc18d22776

[keyserver] Block creating new chats with users that you are not friends with

Description

[keyserver] Block creating new chats with users that you are not friends with

Summary:
Users could create a chat with non-friends because every chat's parent is genesis. Added special case for genesis.

https://linear.app/comm/issue/ENG-2159/disallow-chat-creation-with-users-you-arent-friends-with-on-the

Test Plan:
Tested creating new threads in genesis:

  • user with friend + nonfriend -> blocked,
  • user with friend + friend -> ok,
  • user with nonfriend private -> ok.

Reviewers: tomek, michal, inka, kamil

Reviewed By: michal, inka

Subscribers: ashoat, atul

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