Skip to content

Commit ce695b6

Browse files
authored
Merge pull request #61089 from bernhardoj/fix/60253-cant-open-new-user-dm-from-invoice
Fix not found page shows when open new user DM from profile page after receiving invoice
2 parents 7e99f08 + bd04b65 commit ce695b6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/libs/ReportUtils.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2241,7 +2241,16 @@ function isOneOnOneChat(report: OnyxEntry<Report>): boolean {
22412241
if (participantAmount !== 1) {
22422242
return false;
22432243
}
2244-
return !isChatRoom(report) && !isExpenseRequest(report) && !isMoneyRequestReport(report) && !isPolicyExpenseChat(report) && !isTaskReport(report) && isDM(report) && !isIOUReport(report);
2244+
return (
2245+
(report?.policyID === CONST.POLICY.ID_FAKE || !report?.policyID) &&
2246+
!isChatRoom(report) &&
2247+
!isExpenseRequest(report) &&
2248+
!isMoneyRequestReport(report) &&
2249+
!isPolicyExpenseChat(report) &&
2250+
!isTaskReport(report) &&
2251+
isDM(report) &&
2252+
!isIOUReport(report)
2253+
);
22452254
}
22462255

22472256
/**

0 commit comments

Comments
 (0)