Skip to content

Commit a52088e

Browse files
authored
Merge pull request Expensify#75813 from Burhan-Rashid/fix/75278
fix: added chatReportID to the optimistic chat report while building transaction thread
2 parents b9e3459 + 44ca1b2 commit a52088e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/libs/ReportUtils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7661,6 +7661,7 @@ type BuildOptimisticChatReportParams = {
76617661
avatarUrl?: string;
76627662
optimisticReportID?: string;
76637663
isPinned?: boolean;
7664+
chatReportID?: string;
76647665
};
76657666

76667667
function buildOptimisticChatReport({
@@ -7680,6 +7681,7 @@ function buildOptimisticChatReport({
76807681
avatarUrl = '',
76817682
optimisticReportID = '',
76827683
isPinned = false,
7684+
chatReportID = undefined,
76837685
}: BuildOptimisticChatReportParams): OptimisticChatReport {
76847686
const isWorkspaceChatType = chatType && isWorkspaceChat(chatType);
76857687
const participants = participantList.reduce((reportParticipants: Participants, accountID: number) => {
@@ -7716,6 +7718,7 @@ function buildOptimisticChatReport({
77167718
description,
77177719
writeCapability,
77187720
avatarUrl,
7721+
chatReportID,
77197722
};
77207723

77217724
if (chatType === CONST.REPORT.CHAT_TYPE.INVOICE) {
@@ -8546,6 +8549,7 @@ function buildTransactionThread(
85468549
...existingTransactionThreadReport,
85478550
parentReportActionID: reportAction?.reportActionID,
85488551
parentReportID: moneyRequestReport?.reportID,
8552+
chatReportID: moneyRequestReport?.reportID,
85498553
reportName: getTransactionReportName({reportAction}),
85508554
policyID: moneyRequestReport?.policyID,
85518555
};
@@ -8560,6 +8564,7 @@ function buildTransactionThread(
85608564
parentReportActionID: reportAction?.reportActionID,
85618565
parentReportID: moneyRequestReport?.reportID,
85628566
optimisticReportID: optimisticTransactionThreadReportID,
8567+
chatReportID: moneyRequestReport?.reportID,
85638568
});
85648569
}
85658570

0 commit comments

Comments
 (0)