Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$500] Room - Room member cannot see thread members when they are not part of the workspace #34440

Closed
6 tasks done
kbecciv opened this issue Jan 12, 2024 · 10 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Jan 12, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.24-7
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Issue found when executing PR #30863

Action Performed:

Precondition: Admin and User B do not share a workspace.

  1. [Admin] Invite User B to a room (workspace visibility).
  2. [Admin] Send a message to the room and create a thread.
  3. [User B] Go to the thread in Step 2 and click on the header.
  4. [User B] Send a reply to the thread.
  5. [User B] Tap on the header.

Expected Result:

In Step 3 and 5, Members row will be present to show who are the members of the thread,

Actual Result:

In Step 3 and 5, there is no "Members" option.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6340073_1705060636860.20240110_124048.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d076d18516e66568
  • Upwork Job ID: 1745793693860638720
  • Last Price Increase: 2024-01-19
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 12, 2024
@melvin-bot melvin-bot bot changed the title Room - Room member cannot see thread members when they are not part of the workspace [$500] Room - Room member cannot see thread members when they are not part of the workspace Jan 12, 2024
Copy link

melvin-bot bot commented Jan 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01d076d18516e66568

Copy link

melvin-bot bot commented Jan 12, 2024

Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 12, 2024
Copy link

melvin-bot bot commented Jan 12, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 12, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

In Step 3 and 5, there is no "Members" option.

What is the root cause of that problem?

We only show the member option if the report is group or DM or policy room and the user is a member of policy.

But this user isn't a member of the policy room so the member doesn't appear.

isRoomMember = ReportUtil.isRoomMember(props.report);
 if ((!isUserCreatedPolicyRoom && participants.length) || (isUserCreatedPolicyRoom && (isPolicyMember || isRoomMember) && participants.length)) { 

function isRoomMember(report: Report) {
    const rootReport = getRootParentReport(report);
    return rootReport.parentReportActionIDs?.includes(Number(currentUserAccountID));
}

if ((!isUserCreatedPolicyRoom && participants.length) || (isUserCreatedPolicyRoom && isPolicyMember)) {

What changes do you think we should make in order to solve the problem?

Because of now, when we invite a user to the room. This user doesn't a member of the workspace. So here we should check if the report.participantAccountIDs contain the current user, we will show the member option.

OPTIONAL: We also can add the check participant.length === 0 as well because some users can leave the room.

if ((!isUserCreatedPolicyRoom && participants.length) || (isUserCreatedPolicyRoom && isPolicyMember)) {

Actually BE returns the participantAccountIDs as empty array of the room or the thread of the room if the user doesn't a policy member. So we also should fix this from BE.

What alternative solutions did you explore? (Optional)

We can only check participants.length here.

if ((!isUserCreatedPolicyRoom && participants.length) || (isUserCreatedPolicyRoom && isPolicyMember)) {

@mollfpr
Copy link
Contributor

mollfpr commented Jan 13, 2024

Based on this PR #32857, it's expected not to show the option for non-workspace users.

@twisterdotcom Could you verify if we now want to show the members option for the non-workspace user?

@melvin-bot melvin-bot bot added the Overdue label Jan 15, 2024
@twisterdotcom
Copy link
Contributor

@MitchExpensify I think you might know this. I assume a guest wouldn't be able to see the members and this is expected?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 16, 2024
@twisterdotcom
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Jan 18, 2024
Copy link

melvin-bot bot commented Jan 19, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@MitchExpensify
Copy link
Contributor

@melvin-bot melvin-bot bot added the Overdue label Jan 22, 2024
@twisterdotcom
Copy link
Contributor

Okay, we discussed this and this is expected. Workspace members can view all other workspace members contact information, but non-workspace members (ie guests in the chat) cannot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

5 participants