Skip to content

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

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 12, 2024
  2. 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[/+] on Jan 12, 2024
  3. melvin-bot commented on Jan 12, 2024

    @melvin-bot
  4. melvin-bot commented on Jan 12, 2024

    @melvin-bot

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

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 12, 2024
  6. melvin-bot commented on Jan 12, 2024

    @melvin-bot

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

  7. dukenv0307 commented on Jan 12, 2024

    @dukenv0307
    Contributor

    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)) {

  8. mollfpr commented on Jan 13, 2024

    @mollfpr
    Contributor

    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?

  9. twisterdotcom commented on Jan 16, 2024

    @twisterdotcom
    Contributor

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

  10. twisterdotcom commented on Jan 18, 2024

    @twisterdotcom
    Contributor
  11. melvin-bot commented on Jan 19, 2024

    @melvin-bot

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

  12. MitchExpensify commented on Jan 19, 2024

    @MitchExpensify
    Contributor
  13. twisterdotcom commented on Jan 22, 2024

    @twisterdotcom
    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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions