diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 264fefac8753..6ea5ba97d62e 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -614,7 +614,7 @@ function isDM(report) { * @returns {Boolean} */ function hasSingleParticipant(report) { - return report.participants && report.participants.length === 1; + return report.participantAccountIDs && report.participantAccountIDs.length === 1; } /** diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index 6227686b3f45..d66cc243acf4 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -743,7 +743,10 @@ function getShareDestination(reportID, reports, personalDetails) { const report = lodashGet(reports, `report_${reportID}`, {}); let subtitle = ''; if (ReportUtils.isChatReport(report) && ReportUtils.isDM(report) && ReportUtils.hasSingleParticipant(report)) { - subtitle = LocalePhoneNumber.formatPhoneNumber(report.participants[0]); + const participantAccountID = lodashGet(report, 'participantAccountIDs[0]'); + const displayName = lodashGet(personalDetails, [participantAccountID, 'displayName']); + const login = lodashGet(personalDetails, [participantAccountID, 'login']); + subtitle = LocalePhoneNumber.formatPhoneNumber(login || displayName); } else { subtitle = ReportUtils.getChatRoomSubtitle(report); }