-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Web - LHN shows a message that has been flagged as Intimidation or Bullying as an "alternateText" #23570
Comments
Triggered auto assignment to @sonialiap ( |
Bug0 Triage Checklist (Main S/O)
|
Proposal: @AmjedNazzal ProposalAmjedNazzal on GH Please re-state the problem that we are trying to solve in this issue.LHN shows a message that has been flagged as Intimidation or Bullying as an "alternateText" What is the root cause of that problem?The issue is that OptionsListUtils.getLastMessageTextForReport is only accounting for the case where MODERATOR_DECISION is PENDING_REMOVE and not PENDING_HIDE and so when a message is hidden but not deleted we still push it through to the LHN as "alternateText"; App/src/libs/OptionsListUtils.js Lines 411 to 417 in c1267ca
What changes do you think we should make in order to solve the problem?We first need to make isPendingHide function in ReportActionUtils function isPendingHide(reportAction) {
return lodashGet(reportAction, 'message[0].moderationDecisions[0].decision') === CONST.MODERATION.MODERATOR_DECISION_PENDING_HIDE;
} We then can change OptionsListUtils.getLastMessageTextForReport to account for pending hide messages if (ReportActionUtils.isPendingRemove(lastNonWhisper) || ReportActionUtils.isPendingHide(lastNonWhisper)) {
const latestVisibleAction =
_.find(
allSortedReportActions[report.reportID],
(action) => ReportActionUtils.shouldReportActionBeVisible(action, action.reportActionID) && !ReportActionUtils.isWhisperAction(action) && !ReportActionUtils.isPendingHide(action),
) || {};
lastMessageTextFromReport = lodashGet(latestVisibleAction, 'message[0].text', '');
} We also need to account for the return of "_fake_" in SideBarUtils in case the hidden message is in a thread where no other message is before it, this way it would return "No Activity Yet". result.alternateText = lastMessageTextFromReport.length > 0 && lastMessageTextFromReport !== '__fake__' ? lastMessageText : Localize.translate(preferredLocale, 'report.noActivityYet'); What alternative solutions did you explore? (Optional)ResultScreen.Recording.2023-07-24.at.5.49.31.PM.movKateryna Becciv Reply… |
Reproducible Hmm looks like we should have fixed this in this issue #21497, right @greg-schroeder ? |
Dupe of #21890 |
I think it is separate from #21890. The author reported both of these separately. Solution of #21890 does not overlap with this issue. @sonialiap Edit: As the solution is very much different for both issues. It's fine for both to be two different bugs. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Like messages reported as Harrasment/Assault, messages flagged as Intimidation or Bullying should not be shown in LHN "alternateText" section
Actual Result:
The flagged message still shows as an alternateText in LHN
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.44-0
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
Notes/Photos/Videos: Any additional supporting documentation
Screen.Recording.2023-07-24.at.3.15.06.PM.mov
Recording.3898.mp4
Expensify/Expensify Issue URL:
Issue reported by: @AmjedNazzal
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690212523695399
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: