Skip to content

Commit

Permalink
Merge pull request Expensify#39993 from nkdengineer/fix/39618
Browse files Browse the repository at this point in the history
fix: Missing 'Leave Thread' Button Offline in Self DM Thread
  • Loading branch information
puneetlath authored Apr 25, 2024
2 parents f9b05c0 + b758ccf commit 6906090
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -949,10 +949,12 @@ function navigateToAndOpenChildReport(childReportID = '0', parentReportAction: P
} else {
const participantAccountIDs = [...new Set([currentUserAccountID, Number(parentReportAction.actorAccountID)])];
const parentReport = allReports?.[parentReportID];
// Threads from DMs and selfDMs don't have a chatType. All other threads inherit the chatType from their parent
const childReportChatType = parentReport && ReportUtils.isSelfDM(parentReport) ? undefined : parentReport?.chatType;
const newChat = ReportUtils.buildOptimisticChatReport(
participantAccountIDs,
parentReportAction?.message?.[0]?.text,
parentReport?.chatType,
childReportChatType,
parentReport?.policyID ?? CONST.POLICY.OWNER_EMAIL_FAKE,
CONST.POLICY.OWNER_ACCOUNT_ID_FAKE,
false,
Expand Down

0 comments on commit 6906090

Please sign in to comment.