HomePhabricator
Diffusion Comm bf9dce39edb8

[lib][native][web] Include viewerID in userInfoSelectorForPotentialMembers

Description

[lib][native][web] Include viewerID in userInfoSelectorForPotentialMembers

Summary:
This is the start of a series of diffs that will enable support for creating a PRIVATE thread via the "chat composer", which is the main chat creation interface.

This diff modifies userInfoSelectorForPotentialMembers to include the viewer in its result.

There are 6 callsites of this function. For 4 of the 6 callsites, we reverse this by including the viewerID in excludeUserIDs.

The remaining 2 callsites are MessageListContainer on native, and its equivalent ChatMessageListContainer on web. This intention of this diff is to make the viewerID's UserInfo accessible to the code there, but we'll still need to exclude it in certain cases. The full solution for these is handled in subsequent diff.

Depends on D13539

Test Plan:

  1. For the 4/6 callsites where we reversed the inclusion of viewerID via excludeUserIDs, I verified that the result of userInfoSelectorForPotentialMembers wasn't used anywhere else where it would fail to be excluded.
  2. For the 2/6 callsites where we didn't reverse the inclusion, I tested in combination with the following diffs by trying to create a chat with myself via the chat composer.

Reviewers: tomek, kamil, inka

Reviewed By: tomek

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

Details

Provenance
ashoatAuthored on Sep 30 2024, 7:06 PM
Reviewer
tomek
Differential Revision
D13540: [lib][native][web] Include viewerID in userInfoSelectorForPotentialMembers
Parents
rCOMM85a6ce452b9e: [lib] Support creating private thread from user profile
Branches
Unknown
Tags
Unknown