diff --git a/src/libs/OptionsListUtils/index.ts b/src/libs/OptionsListUtils/index.ts index b3171ca331f2..7aacf3099e1b 100644 --- a/src/libs/OptionsListUtils/index.ts +++ b/src/libs/OptionsListUtils/index.ts @@ -437,11 +437,14 @@ function getLastActorDisplayName(lastActorDetails: Partial | nu * Should show the last actor display name from last actor details. */ function shouldShowLastActorDisplayName(report: OnyxEntry, lastActorDetails: Partial | null, lastAction: OnyxEntry) { + const reportID = report?.reportID; + const lastReportAction = reportID ? lastVisibleReportActions[reportID] : lastAction; + if ( !lastActorDetails || reportUtilsIsSelfDM(report) || (isDM(report) && lastActorDetails.accountID !== currentUserAccountID) || - lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU || + (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && lastReportAction?.actorAccountID !== CONST.ACCOUNT_ID.CONCIERGE) || (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && Object.keys(report?.participants ?? {})?.some((participantID) => participantID === CONST.ACCOUNT_ID.MANAGER_MCTEST.toString())) ) {