Skip to content

Commit 33e73ef

Browse files
Merge pull request #41251 from rayane-djouah/Fix-User-invited-by-mentioning-from-a-concierge-whisper-can't-see-parent-message
Fix: User invited by mentioning from a concierge whisper can't see parent message
2 parents 3a14704 + 0f9dc42 commit 33e73ef

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/libs/ReportUtils.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6185,16 +6185,21 @@ function getAllAncestorReportActions(report: Report | null | undefined): Ancesto
61856185
const parentReport = getReport(parentReportID);
61866186
const parentReportAction = ReportActionsUtils.getReportAction(parentReportID, parentReportActionID ?? '0');
61876187

6188-
if (!parentReportAction || ReportActionsUtils.isTransactionThread(parentReportAction) || !parentReport) {
6188+
if (!parentReportAction || ReportActionsUtils.isTransactionThread(parentReportAction)) {
61896189
break;
61906190
}
61916191

6192-
const isParentReportActionUnread = ReportActionsUtils.isCurrentActionUnread(parentReport, parentReportAction);
6192+
const isParentReportActionUnread = ReportActionsUtils.isCurrentActionUnread(parentReport ?? {}, parentReportAction);
61936193
allAncestors.push({
61946194
report: currentReport,
61956195
reportAction: parentReportAction,
61966196
shouldDisplayNewMarker: isParentReportActionUnread,
61976197
});
6198+
6199+
if (!parentReport) {
6200+
break;
6201+
}
6202+
61986203
parentReportID = parentReport?.parentReportID;
61996204
parentReportActionID = parentReport?.parentReportActionID;
62006205
if (!isEmptyObject(parentReport)) {
@@ -6224,13 +6229,17 @@ function getAllAncestorReportActionIDs(report: Report | null | undefined, includ
62246229
const parentReport = getReport(parentReportID);
62256230
const parentReportAction = ReportActionsUtils.getReportAction(parentReportID, parentReportActionID ?? '0');
62266231

6227-
if (!parentReportAction || (!includeTransactionThread && ReportActionsUtils.isTransactionThread(parentReportAction)) || !parentReport) {
6232+
if (!parentReportAction || (!includeTransactionThread && ReportActionsUtils.isTransactionThread(parentReportAction))) {
62286233
break;
62296234
}
62306235

62316236
allAncestorIDs.reportIDs.push(parentReportID ?? '');
62326237
allAncestorIDs.reportActionsIDs.push(parentReportActionID ?? '');
62336238

6239+
if (!parentReport) {
6240+
break;
6241+
}
6242+
62346243
parentReportID = parentReport?.parentReportID;
62356244
parentReportActionID = parentReport?.parentReportActionID;
62366245
}

0 commit comments

Comments
 (0)