Skip to content

[$500] Flag - Flag message for flagged parent message disappears when reopening thread #34151

Closed

Description

@lanitochka17

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.23-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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Issue found when executing PR https://github.com/Expensify/App/pull/33676ithub.com/Expensify/App/

Action Performed:

  1. [User A] Send a message to User B
  2. [User B] Open the message in thread
  3. [User B] Send a reply in thread
  4. [User B] Flag the message as Intimidation
  5. [User B] Return to main chat
  6. [User B] Reopen the thread
    Note that

Expected Result:

The flag message for the flagged parent message does not disappear

Actual Result:

The flag message for the flagged parent message disappears

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

Bug6336764_1704811453379.20240109_211928.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ea3ffb8d539f6e86
  • Upwork Job ID: 1744738298135650304
  • Last Price Increase: 2024-01-16
  • Automatic offers:
    • situchan | Contributor | 28104518

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 9, 2024
  2. changed the title [-]Flag - Flag message for flagged parent message disappears when reopening thread[/-] [+][$500] Flag - Flag message for flagged parent message disappears when reopening thread[/+] on Jan 9, 2024
  3. melvin-bot commented on Jan 9, 2024

    @melvin-bot

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

  4. melvin-bot commented on Jan 9, 2024

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

    @melvin-bot

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

  7. yh-0218 commented on Jan 9, 2024

    @yh-0218
    Contributor

    I think this is backend issue

  8. yh-0218 commented on Jan 9, 2024

    @yh-0218
    Contributor

    Proposal

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

    Flag - Flag message for flagged parent message disappears when reopening thread

    What is the root cause of that problem?

    I think this is backend issue.
    But we can fix on here easilly.

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

    const latestDecision = lodashGet(props, ['action', 'message', 0, 'moderationDecision', 'decision'], '') || lodashGet(props, ['action', 'originalMessage', 'moderationDecision', 'decision'], '');

    What alternative solutions did you explore? (Optional)

    FREE.-.HDconvert.com.Screen.Recording.2024-01-09.at.8.15.33.PM.mov
  9. ikevin127 commented on Jan 9, 2024

    @ikevin127
    Contributor

    Proposal

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

    The flag message for the flagged parent message disappears when reopening thread.

    What is the root cause of that problem?

    // Hide the message if it is being moderated for a higher offense, or is hidden by a moderator
    // Removed messages should not be shown anyway and should not need this flow
    const latestDecision = lodashGet(props, ['action', 'message', 0, 'moderationDecision', 'decision'], '');

    In the line above, we're looking for the decision within action.message[0] but when re-fetching OpenReport the BE doesn't pass the decision in message like it does when first calling the flagging endpoint.

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

    As fallback to the latestDecision from action.message[0] we should add latestDecisionOriginal which we get from the originalMessage object instead of action.message[0] where its missing.

    POC looks something like this:

    +   const latestDecisionOriginal = lodashGet(props, ['action', 'originalMessage', 0, 'moderationDecision', 'decision'], '');
        const latestDecision = lodashGet(
                props, ['action', 'message', 'moderationDecision', 'decision'],
    +           latestDecisionOriginal
        );

    What alternative solutions did you explore? (Optional)

    A back-end only fix which would require the decision to be returned within action.message[0] such that we won't need the front-end originalMessage fallback.

    Videos

    MacOS: Chrome / Safari
    Screen.Recording.2024-01-09.at.20.19.31.mov
  10. 25 remaining items

  11. melvin-bot commented on Jan 30, 2024

    @melvin-bot

    @tylerkaraszewski @slafortune @situchan this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

  12. tylerkaraszewski commented on Jan 30, 2024

    @tylerkaraszewski
    Contributor

    @dangrous - what do you think we should do with this issue?

  13. dangrous commented on Jan 31, 2024

    @dangrous
    Contributor

    I think we're probably deprioritizing moderation bugs? It's not currently covered by a wave, as far as I know. Can you think of one where it might fit? I can add this to a list I have of moderation bugs so we can come back to it at some point

  14. situchan commented on Jan 31, 2024

    @situchan
    Contributor

    Btw please keep me assigned here in case frontend fix is needed

  15. slafortune commented on Feb 2, 2024

    @slafortune
    Contributor

    Works for me @dangrous ! I'll assign @situchan so if this is opened again that will still be the assignment and close for now.

  16. kbecciv commented on Feb 6, 2024

    @kbecciv

    Issue is reproduced on build 1.4.37.0 when executing PR #28002

    20240206_185900.mp4
  17. reopened this on Feb 6, 2024
  18. dangrous commented on Feb 7, 2024

    @dangrous
    Contributor

    Just marking this out - we are aware that this bug still exists, but not prioritizing as of now, so re-closing!

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.DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staffretest-weeklyApply this label if you want this issue tested on a Weekly basis by Applause

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions