Repository navigation
[$500] Room - Room member cannot see thread members when they are not part of the workspace #34440
Description
Activity
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorDailyKSv2KSv2BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on Jan 12, 2024 - 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 Job added to Upwork: https://www.upwork.com/jobs/~01d076d18516e66568
Triggered auto assignment to @twisterdotcom (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.- addedHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributors
on Jan 12, 2024 Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (
External)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)); }App/src/pages/ReportDetailsPage.js
Line 111 in 964548a
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.participantAccountIDscontain the current user, we will show the member option.OPTIONAL: We also can add the check
participant.length === 0as well because some users can leave the room.App/src/pages/ReportDetailsPage.js
Line 111 in 964548a
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.lengthhere.
App/src/pages/ReportDetailsPage.js
Line 111 in 964548a
if ((!isUserCreatedPolicyRoom && participants.length) || (isUserCreatedPolicyRoom && isPolicyMember)) { 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?
@MitchExpensify I think you might know this. I assume a guest wouldn't be able to see the members and this is expected?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Sorry for the delay @twisterdotcom, responded in the Slack thread: https://expensify.slack.com/archives/C01SKUP7QR0/p1705696338477789?thread_ts=1705620779.090059&cid=C01SKUP7QR0
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.
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.
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?
Screenshots/Videos
Add any screenshot/video evidence
Bug6340073_1705060636860.20240110_124048.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit