diff --git a/src/components/ReportActionItem/MoneyRequestAction.js b/src/components/ReportActionItem/MoneyRequestAction.js index 5e5ee4829786..bb312f85be41 100644 --- a/src/components/ReportActionItem/MoneyRequestAction.js +++ b/src/components/ReportActionItem/MoneyRequestAction.js @@ -100,7 +100,7 @@ function MoneyRequestAction({ // If the childReportID is not present, we need to create a new thread const childReportID = lodashGet(action, 'childReportID', 0); if (!childReportID) { - const thread = ReportUtils.buildTransactionThread(action); + const thread = ReportUtils.buildTransactionThread(action, requestReportID); const userLogins = PersonalDetailsUtils.getLoginsByAccountIDs(thread.participantAccountIDs); Report.openReport(thread.reportID, userLogins, thread, action.reportActionID); Navigation.navigate(ROUTES.getReportRoute(thread.reportID)); diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 264fefac8753..48873a8699f9 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2502,7 +2502,7 @@ function buildOptimisticTaskReport(ownerAccountID, assigneeAccountID = 0, parent * * @returns {Object} */ -function buildTransactionThread(reportAction) { +function buildTransactionThread(reportAction, moneyRequestReportID) { const participantAccountIDs = _.uniq([currentUserAccountID, Number(reportAction.actorAccountID)]); return buildOptimisticChatReport( participantAccountIDs, @@ -2516,7 +2516,7 @@ function buildTransactionThread(reportAction) { undefined, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, reportAction.reportActionID, - reportAction.reportID, + moneyRequestReportID, ); } diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index a3621da3e820..bac79e1863e5 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -284,7 +284,7 @@ export default [ hideContextMenu(false); const childReportID = lodashGet(reportAction, 'childReportID', 0); if (!childReportID) { - const thread = ReportUtils.buildTransactionThread(reportAction); + const thread = ReportUtils.buildTransactionThread(reportAction, reportID); const userLogins = PersonalDetailsUtils.getLoginsByAccountIDs(thread.participantAccountIDs); Report.openReport(thread.reportID, userLogins, thread, reportAction.reportActionID); Navigation.navigate(ROUTES.getReportRoute(thread.reportID));