Skip to content

Commit

Permalink
Added comment to lastMessageText
Browse files Browse the repository at this point in the history
  • Loading branch information
Ollyws committed Oct 14, 2022
1 parent fba4869 commit d9af57f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/SidebarUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ function getOptionData(reportID) {
result.alternateText = lastMessageText || subtitle;
} else {
if (hasMultipleParticipants && !lastMessageText) {
// Here we get the beginning of chat history message and append the display name for each user, adding pronouns if there are any.
// We also add a fullstop after the final name, the word "and" before the final name and commas between all previous names.
lastMessageText = Localize.translate(preferredLocale, 'reportActionsView.beginningOfChatHistory')
+ _.map(displayNamesWithTooltips, ({displayName, pronouns}, index) => {
const formattedText = _.isEmpty(pronouns) ? displayName : `${displayName} (${pronouns})`;
Expand Down

0 comments on commit d9af57f

Please sign in to comment.