diff --git a/src/libs/actions/Report/index.ts b/src/libs/actions/Report/index.ts index 3bffe9345b5b..50bbde3fb8e1 100644 --- a/src/libs/actions/Report/index.ts +++ b/src/libs/actions/Report/index.ts @@ -1967,10 +1967,16 @@ function createTransactionThreadReport( const optimisticTransactionThreadReportID = generateReportID(); const optimisticTransactionThread = buildTransactionThread(iouReportAction, reportToUse, undefined, optimisticTransactionThreadReportID); const shouldAddPendingFields = transaction?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD || iouReportAction?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD; + const participantAccountIDsForDetails = [currentUserAccountID]; + if (iouReportAction?.actorAccountID && iouReportAction.actorAccountID !== currentUserAccountID) { + participantAccountIDsForDetails.push(iouReportAction.actorAccountID); + } + const participantLogins = PersonalDetailsUtils.getLoginsByAccountIDs(participantAccountIDsForDetails); + const participants = buildParticipantInfoFromLogins(participantLogins); openReport({ reportID: optimisticTransactionThreadReportID, introSelected, - participants: currentUserLogin ? [{login: currentUserLogin, accountID: currentUserAccountID}] : [], + participants, // TODO: allPersonalDetails fallback should be removed in follow-up PRs https://github.com/Expensify/App/issues/73656 personalDetails: personalDetails ?? allPersonalDetails, newReportObject: optimisticTransactionThread,