Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4138,7 +4138,13 @@ function chatIncludesChronos(report: OnyxEntry<Report> | EmptyObject): boolean {
* - It's an ADDCOMMENT that is not an attachment
*/
function canFlagReportAction(reportAction: OnyxEntry<ReportAction>, reportID: string | undefined): boolean {
const report = getReport(reportID);
let report = getReport(reportID);

// If the childReportID exists in reportAction and is equal to the reportID,
Comment thread
dukenv0307 marked this conversation as resolved.
// the report action being evaluated is the parent report action in a thread, and we should get the parent report to evaluate instead.
if (reportAction?.childReportID?.toString() === reportID?.toString()) {
report = getReport(report?.parentReportID);
}
const isCurrentUserAction = reportAction?.actorAccountID === currentUserAccountID;
const isOriginalMessageHaveHtml =
reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT ||
Expand Down